Fix typos (#95)

This commit is contained in:
Murat Ambarkutuk 2016-12-13 05:34:02 -05:00 committed by Me No Dev
parent c336989e93
commit 551e422423

View File

@ -85,44 +85,44 @@ Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
- Download and install [esp-idf](https://github.com/espressif/esp-idf) - Download and install [esp-idf](https://github.com/espressif/esp-idf)
- Create blank idf project (from one of the examples) - Create blank idf project (from one of the examples)
- in the project folder, create a folder called components and clone this repository inside - in the project folder, create a folder called components and clone this repository inside
```bash ```bash
mkdir -p components && \ mkdir -p components && \
cd components && \ cd components && \
git clone https://github.com/espressif/arduino-esp32.git arduino && \ git clone https://github.com/espressif/arduino-esp32.git arduino && \
cd.. && \ cd .. && \
make menuconfig make menuconfig
``` ```
- ```make menuconfig``` has some Arduino options - ```make menuconfig``` has some Arduino options
- "Autostart Arduino setup and loop on boot" - "Autostart Arduino setup and loop on boot"
- If you enable this options, your main.cpp should be formated like any other sketch - If you enable this options, your main.cpp should be formated like any other sketch
```arduino ```arduino
//file: main.cpp //file: main.cpp
#include "Arduino.h" #include "Arduino.h"
void setup(){ void setup(){
Serial.begin(115200); Serial.begin(115200);
} }
void loop(){ void loop(){
Serial.println("loop"); Serial.println("loop");
delay(1000); delay(1000);
} }
``` ```
- Else you need to implement ```app_main()``` and call ```initArduino();``` in it. - Else you need to implement ```app_main()``` and call ```initArduino();``` in it.
Keep in mind that setup() and loop() will not be called in this case Keep in mind that setup() and loop() will not be called in this case
```arduino ```arduino
//file: main.cpp //file: main.cpp
#include "Arduino.h" #include "Arduino.h"
extern "C" void initArduino(); extern "C" void initArduino();
extern "C" void app_main() extern "C" void app_main()
{ {
initArduino(); initArduino();
pinMode(4, OUPUT); pinMode(4, OUTPUT);
digitalWrite(4, HIGH); digitalWrite(4, HIGH);
//do your own thing //do your own thing
} }