Skip to content

Commit e6ba0f6

Browse files
Raienryu97me-no-dev
authored andcommittedAug 17, 2017
DOCUMENTATION: Moved installation instructions to separate page (espressif#561)
* DOCUMENTATION: Moved installation instructions to separate page * Added Fedora to contents table * Added Issue/Bug Report section to README * Some minor improvements * DOCUMENTATION: Rename directory doc to docs * Also move ISSUE_TEMPLATE.md to docs directory * DOCUMENTATION: Use current repo's files * This makes it consistent instead of having few local and few pointing to espressif/arduino-esp32 by all linking to local files * DOCUMENTATION: Fix hyperlink to issue/bug template in contents * DOCUMENTATION: contents: supress platform specific installation instruction
1 parent 3a8e28d commit e6ba0f6

18 files changed

+159
-153
lines changed
 

‎README.md

+20-134
Original file line numberDiff line numberDiff line change
@@ -2,160 +2,46 @@
22

33
[![Build Status](https://travis-ci.org/espressif/arduino-esp32.svg?branch=master)](https://travis-ci.org/espressif/arduino-esp32)
44

5-
## Need help or have a question? Join the chat at [![https://gitter.im/espressif/arduino-esp32](https://badges.gitter.im/espressif/arduino-esp32.svg)](https://gitter.im/espressif/arduino-esp32?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
### Need help or have a question? Join the chat at [![https://gitter.im/espressif/arduino-esp32](https://badges.gitter.im/espressif/arduino-esp32.svg)](https://gitter.im/espressif/arduino-esp32?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

7+
## Contents
78
- [Development Status](#development-status)
8-
- [Installation Instructions](#installation-instructions):
9-
+ [Using Arduino IDE](#using-through-arduino-ide)
10-
+ [Windows](https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md)
11-
+ [Mac OS](#instructions-for-mac)
12-
+ [Debian/Ubuntu](#instructions-for-debianubuntu-linux)
13-
+ [Decoding Exceptions](#decoding-exceptions)
14-
+ [Using PlatformIO](#using-platformio)
15-
+ [Using as ESP-IDF component](#using-as-esp-idf-component)
9+
- [Installation Instructions](#installation-instructions)
10+
- [Decoding Exceptions](#decoding-exceptions)
11+
- [Issue/Bug report template](#issuebug-report-template)
1612
- [ESP32Dev Board PINMAP](#esp32dev-board-pinmap)
1713

1814
## Development Status
1915
Most of the framework is implemented. Most noticable is the missing analogWrite. While analogWrite is on it's way, there are a few other options that you can use:
20-
- 16 channels [LEDC](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-ledc.h) which is PWM
21-
- 8 channels [SigmaDelta](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-sigmadelta.h) which uses SigmaDelta modulation
22-
- 2 channels [DAC](https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-dac.h) which gives real analog output
16+
- 16 channels [LEDC](cores/esp32/esp32-hal-ledc.h) which is PWM
17+
- 8 channels [SigmaDelta](cores/esp32/esp32-hal-sigmadelta.h) which uses SigmaDelta modulation
18+
- 2 channels [DAC](cores/esp32/esp32-hal-dac.h) which gives real analog output
2319

2420
## Installation Instructions
2521

26-
### Using through Arduino IDE
27-
28-
#### [Instructions for Windows](doc/windows.md)
29-
30-
#### Instructions for Mac
31-
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
32-
- Open Terminal and execute the following command (copy->paste and hit enter):
33-
34-
```bash
35-
mkdir -p ~/Documents/Arduino/hardware/espressif && \
36-
cd ~/Documents/Arduino/hardware/espressif && \
37-
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
38-
cd esp32/tools/ && \
39-
python get.py
40-
```
41-
- Restart Arduino IDE
42-
43-
#### Instructions for Debian/Ubuntu Linux
44-
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
45-
- Open Terminal and execute the following command (copy->paste and hit enter):
46-
47-
```bash
48-
sudo usermod -a -G dialout $USER && \
49-
sudo apt-get install git && \
50-
wget https://bootstrap.pypa.io/get-pip.py && \
51-
sudo python get-pip.py && \
52-
sudo pip install pyserial && \
53-
mkdir -p ~/Arduino/hardware/espressif && \
54-
cd ~/Arduino/hardware/espressif && \
55-
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
56-
cd esp32/tools/ && \
57-
python get.py
58-
```
59-
- Restart Arduino IDE
60-
61-
#### Instructions for Fedora
62-
- Install the latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software). `$ sudo dnf -y install arduino` will most likely install an older release.
63-
- Open Terminal and execute the following command (copy->paste and hit enter):
64-
65-
```bash
66-
sudo usermod -a -G dialout $USER && \
67-
sudo dnf install git python3-pip python3-pyserial && \
68-
mkdir -p ~/Arduino/hardware/espressif && \
69-
cd ~/Arduino/hardware/espressif && \
70-
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
71-
cd esp32/tools/ && \
72-
python get.py
73-
```
74-
- Restart Arduino IDE
22+
- Using Arduino IDE
23+
+ [Instructions for Windows](docs/arduino-ide/windows.md)
24+
+ [Instructions for Mac](docs/arduino-ide/mac.md)
25+
+ [Instructions for Debian/Ubuntu Linux](docs/arduino-ide/debian_ubuntu.md)
26+
+ [Instructions for Fedora](docs/arduino-ide/fedora.md)
27+
- [Using PlatformIO](docs/platformio.md)
28+
- [Building with make](docs/make.md)
29+
- [Using as ESP-IDF component](docs/esp-idf_component.md)
7530

7631
#### Decoding exceptions
7732

7833
You can use [EspExceptionDecoder](https://github.com/me-no-dev/EspExceptionDecoder) to get meaningful call trace.
7934

80-
### Using PlatformIO
81-
82-
[PlatformIO](http://platformio.org) is an open source ecosystem for IoT
83-
development with cross platform build system, library manager and full support
84-
for Espressif ESP32 development. It works on the popular host OS: Mac OS X, Windows,
85-
Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
86-
87-
- [What is PlatformIO?](http://docs.platformio.org/page/what-is-platformio.html)
88-
- [PlatformIO IDE](http://platformio.org/platformio-ide)
89-
- Quick Start with [PlatformIO IDE](http://docs.platformio.org/page/ide/atom.html#quick-start) or [PlatformIO Core](http://docs.platformio.org/page/core.html)
90-
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/page/ide.html) -
91-
Cloud9, Codeanywehre, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM and Visual Studio
92-
- [Project Examples](https://github.com/platformio/platform-espressif32/tree/develop/examples)
93-
- [Using "Stage" (Git) version of Arduino Core](http://docs.platformio.org/page/platforms/espressif32.html#using-arduino-framework-with-staging-version)
94-
95-
### Building with make
35+
#### Issue/Bug report template
36+
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as [for reference](https://github.com/espressif/arduino-esp32/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3A%22for%20reference%22%20).
9637

97-
[makeEspArduino](https://github.com/plerup/makeEspArduino) is a generic makefile for any ESP8266/ESP32 Arduino project.
98-
Using make instead of the Arduino IDE makes it easier to do automated and production builds.
38+
Finally, if you're sure no one else had the issue, follow the [ISSUE_TEMPLATE](docs/ISSUE_TEMPLATE.md) while reporting any issue.
9939

100-
### Using as ESP-IDF component
101-
- Download and install [esp-idf](https://github.com/espressif/esp-idf)
102-
- Create blank idf project (from one of the examples)
103-
- in the project folder, create a folder called components and clone this repository inside
104-
105-
```bash
106-
mkdir -p components && \
107-
cd components && \
108-
git clone https://github.com/espressif/arduino-esp32.git arduino && \
109-
cd .. && \
110-
make menuconfig
111-
```
112-
- ```make menuconfig``` has some Arduino options
113-
- "Autostart Arduino setup and loop on boot"
114-
- If you enable this options, your main.cpp should be formated like any other sketch
115-
116-
```arduino
117-
//file: main.cpp
118-
#include "Arduino.h"
119-
120-
void setup(){
121-
Serial.begin(115200);
122-
}
123-
124-
void loop(){
125-
Serial.println("loop");
126-
delay(1000);
127-
}
128-
```
129-
130-
- Else you need to implement ```app_main()``` and call ```initArduino();``` in it.
131-
132-
Keep in mind that setup() and loop() will not be called in this case.
133-
If you plan to base your code on examples provided in [esp-idf](https://github.com/espressif/esp-idf/tree/master/examples), please make sure move the app_main() function in main.cpp from the files in the example.
134-
135-
```arduino
136-
//file: main.cpp
137-
#include "Arduino.h"
138-
139-
extern "C" void app_main()
140-
{
141-
initArduino();
142-
pinMode(4, OUTPUT);
143-
digitalWrite(4, HIGH);
144-
//do your own thing
145-
}
146-
```
147-
- "Disable mutex locks for HAL"
148-
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
149-
- "Autoconnect WiFi on boot"
150-
- If enabled, WiFi will start with the last known configuration
151-
- Else it will wait for WiFi.begin
152-
- ```make flash monitor``` will build, upload and open serial monitor to your board
15340

15441
## ESP32Dev Board PINMAP
15542

156-
![Pin Functions](doc/esp32_pinmap.png)
43+
![Pin Functions](docs/esp32_pinmap.png)
15744

15845
## Hint
15946

16047
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process
161-
File renamed without changes.

‎docs/arduino-ide/debian_ubuntu.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Installation instructions for Debian / Ubuntu OS
2+
=================================================
3+
4+
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
5+
- Open Terminal and execute the following command (copy->paste and hit enter):
6+
7+
```bash
8+
sudo usermod -a -G dialout $USER && \
9+
sudo apt-get install git && \
10+
wget https://bootstrap.pypa.io/get-pip.py && \
11+
sudo python get-pip.py && \
12+
sudo pip install pyserial && \
13+
mkdir -p ~/Arduino/hardware/espressif && \
14+
cd ~/Arduino/hardware/espressif && \
15+
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
16+
cd esp32/tools/ && \
17+
python get.py
18+
```
19+
- Restart Arduino IDE

‎docs/arduino-ide/fedora.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Installation instructions for Fedora
2+
=====================================
3+
4+
- Install the latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software). `$ sudo dnf -y install arduino` will most likely install an older release.
5+
- Open Terminal and execute the following command (copy->paste and hit enter):
6+
7+
```bash
8+
sudo usermod -a -G dialout $USER && \
9+
sudo dnf install git python3-pip python3-pyserial && \
10+
mkdir -p ~/Arduino/hardware/espressif && \
11+
cd ~/Arduino/hardware/espressif && \
12+
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
13+
cd esp32/tools/ && \
14+
python get.py
15+
```
16+
- Restart Arduino IDE

‎docs/arduino-ide/mac.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Installation instructions for Mac OS
2+
=====================================
3+
4+
- Install latest Arduino IDE from [arduino.cc](https://www.arduino.cc/en/Main/Software)
5+
- Open Terminal and execute the following command (copy->paste and hit enter):
6+
7+
```bash
8+
mkdir -p ~/Documents/Arduino/hardware/espressif && \
9+
cd ~/Documents/Arduino/hardware/espressif && \
10+
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
11+
cd esp32/tools/ && \
12+
python get.py
13+
```
14+
- Restart Arduino IDE
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎doc/windows.md ‎docs/arduino-ide/windows.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,45 @@
55
2. Download and install Git from [git-scm.com](https://git-scm.com/download/win)
66
3. Start ```Git GUI``` and run through the following steps:
77
- Select ```Clone Existing Repository```
8-
9-
![Step 1](win-gui-1.png)
10-
8+
9+
![Step 1](win-screenshots/win-gui-1.png)
10+
1111
- Select source and destination
1212
- Source Location: ```https://github.com/espressif/arduino-esp32.git```
1313
- Target Directory: ```C:/Users/[YOUR_USER_NAME]/Documents/Arduino/hardware/espressif/esp32```
1414
- Change this to your Sketchbook Location if you have a different directory listed underneath the "Sketchbook location" in Arduino preferences.
1515
- Click ```Clone``` to start cloning the repository
16-
17-
![Step 2](win-gui-2.png)
18-
![Step 3](win-gui-3.png)
19-
16+
17+
![Step 2](win-screenshots/win-gui-2.png)
18+
![Step 3](win-screenshots/win-gui-3.png)
19+
2020
- Open ```C:/Users/[YOUR_USER_NAME]/Documents/Arduino/hardware/espressif/esp32/tools``` and double-click ```get.exe```
21-
22-
![Step 4](win-gui-4.png)
23-
21+
22+
![Step 4](win-screenshots/win-gui-4.png)
23+
2424
- When ```get.exe``` finishes, you should see the following files in the directory
25-
26-
![Step 5](win-gui-5.png)
27-
25+
26+
![Step 5](win-screenshots/win-gui-5.png)
27+
2828
4. Plug your ESP32 board and wait for the drivers to install (or install manually any that might be required)
2929
5. Start Arduino IDE
3030
6. Select your board in ```Tools > Board``` menu
3131
7. Select the COM port that the board is attached to
3232
8. Compile and upload (You might need to hold the boot button while uploading)
3333

34-
![Arduino IDE Example](arduino-ide.png)
34+
![Arduino IDE Example](win-screenshots/arduino-ide.png)
3535

3636
### How to update to the latest code
3737

3838
1. Start ```Git GUI``` and you should see the repository under ```Open Recent Repository```. Click on it!
3939

40-
![Update Step 1](win-gui-update-1.png)
41-
40+
![Update Step 1](win-screenshots/win-gui-update-1.png)
41+
4242
2. From menu ```Remote``` select ```Fetch from``` > ```origin```
4343

44-
![Update Step 2](win-gui-update-2.png)
45-
44+
![Update Step 2](win-screenshots/win-gui-update-2.png)
45+
4646
3. Wait for git to pull any changes and close ```Git GUI```
4747
4. Open ```C:/Users/[YOUR_USER_NAME]/Documents/Arduino/hardware/espressif/esp32/tools``` and double-click ```get.exe```
4848

49-
![Step 4](win-gui-4.png)
49+
![Step 4](win-screenshots/win-gui-4.png)

‎docs/esp-idf_component.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
To use as a component of ESP-IDF
2+
=================================================
3+
4+
- Download and install [esp-idf](https://github.com/espressif/esp-idf)
5+
- Create blank idf project (from one of the examples)
6+
- in the project folder, create a folder called components and clone this repository inside
7+
8+
```bash
9+
mkdir -p components && \
10+
cd components && \
11+
git clone https://github.com/espressif/arduino-esp32.git arduino && \
12+
cd .. && \
13+
make menuconfig
14+
```
15+
- ```make menuconfig``` has some Arduino options
16+
- "Autostart Arduino setup and loop on boot"
17+
- If you enable this options, your main.cpp should be formated like any other sketch
18+
19+
```arduino
20+
//file: main.cpp
21+
#include "Arduino.h"
22+
23+
void setup(){
24+
Serial.begin(115200);
25+
}
26+
27+
void loop(){
28+
Serial.println("loop");
29+
delay(1000);
30+
}
31+
```
32+
33+
- Else you need to implement ```app_main()``` and call ```initArduino();``` in it.
34+
35+
Keep in mind that setup() and loop() will not be called in this case.
36+
If you plan to base your code on examples provided in [esp-idf](https://github.com/espressif/esp-idf/tree/master/examples), please make sure move the app_main() function in main.cpp from the files in the example.
37+
38+
```arduino
39+
//file: main.cpp
40+
#include "Arduino.h"
41+
42+
extern "C" void app_main()
43+
{
44+
initArduino();
45+
pinMode(4, OUTPUT);
46+
digitalWrite(4, HIGH);
47+
//do your own thing
48+
}
49+
```
50+
- "Disable mutex locks for HAL"
51+
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core
52+
- "Autoconnect WiFi on boot"
53+
- If enabled, WiFi will start with the last known configuration
54+
- Else it will wait for WiFi.begin
55+
- ```make flash monitor``` will build, upload and open serial monitor to your board
File renamed without changes.

‎docs/make.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
To use make
2+
============
3+
4+
[makeEspArduino](https://github.com/plerup/makeEspArduino) is a generic makefile for any ESP8266/ESP32 Arduino project.Using make instead of the Arduino IDE makes it easier to do automated and production builds.

‎docs/platformio.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Installation instructions for using PlatformIO
2+
=================================================
3+
4+
[PlatformIO](http://platformio.org) is an open source ecosystem for IoT development with cross platform build system, library manager and full support for Espressif ESP32 development. It works on the popular host OS: Mac OS X, Windows,Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).
5+
6+
- [What is PlatformIO?](http://docs.platformio.org/page/what-is-platformio.html)
7+
- [PlatformIO IDE](http://platformio.org/platformio-ide)
8+
- Quick Start with [PlatformIO IDE](http://docs.platformio.org/page/ide/atom.html#quick-start) or [PlatformIO Core](http://docs.platformio.org/page/core.html)
9+
- [Integration with Cloud and Standalone IDEs](http://docs.platformio.org/page/ide.html) -
10+
Cloud9, Codeanywehre, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM and Visual Studio
11+
- [Project Examples](https://github.com/platformio/platform-espressif32/tree/develop/examples)
12+
- [Using "Stage" (Git) version of Arduino Core](http://docs.platformio.org/page/platforms/espressif32.html#using-arduino-framework-with-staging-version)

0 commit comments

Comments
 (0)
Please sign in to comment.