User Tools

Site Tools


users:dagnall53:esp32differences

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
users:dagnall53:esp32differences [2019/02/14 18:55]
dagnall53 [ESP32 setup]
users:dagnall53:esp32differences [2019/03/17 19:45] (current)
dagnall53 [ESP32 setup]
Line 5: Line 5:
  
 On the ESP8266 NodeMCU, the Arduino compiler "​understands"​ '​D0'​ '​D1'​ etc and assigns them to the actual esp ports that are marked D0 D1 on the NodeMCU board. The WiRocS code then uses the Rocnet "​address"​ to select D1 -D8 as needed. Address 1 is D1 etc. \\ On the ESP8266 NodeMCU, the Arduino compiler "​understands"​ '​D0'​ '​D1'​ etc and assigns them to the actual esp ports that are marked D0 D1 on the NodeMCU board. The WiRocS code then uses the Rocnet "​address"​ to select D1 -D8 as needed. Address 1 is D1 etc. \\
 +
 +====== ESP32 Port / Pin Numbering ======
  
 The ESP 32 boards do not have "​D"​ numbered ports, but instead are marked with the '​correct'​ esp 32 port numbers. To avoid a lot of confusion in my code and to keep the ESP 32 stuff as compatible with the ESP 8266 as possible, I internally assign these esp port numbers to the RocNet Addresses that will control them. This is done in a table in Directives.h\\ The ESP 32 boards do not have "​D"​ numbered ports, but instead are marked with the '​correct'​ esp 32 port numbers. To avoid a lot of confusion in my code and to keep the ESP 32 stuff as compatible with the ESP 8266 as possible, I internally assign these esp port numbers to the RocNet Addresses that will control them. This is done in a table in Directives.h\\
Line 26: Line 28:
   static const  uint8_t ​ D16  = 35;  ​   static const  uint8_t ​ D16  = 35;  ​
   ​   ​
-\\ The ordering of this list can be changed, and I may do so to make the ports "​sensibly"​ ordered to match a particular board configuration. \\+\\ The ordering of this list can be changed, and I may do so to make the ports "​sensibly"​ ordered to match a particular board configuration ​in the future. \\ 
 + 
 +---- 
 + 
 +====== Limitations ====== 
 There are some hardware limitations: ​ There are some hardware limitations: ​
   * Ports 34-39 do not have the ability to switch in pullup resistors and are only available as Inputs.   * Ports 34-39 do not have the ability to switch in pullup resistors and are only available as Inputs.
   * Ports 25 and 26 are physical DAC types so output 0-3.3V analogue. I have arranged that these output voltages are set by the Pi03 settings, as though they were conventional PWM outputs.   * Ports 25 and 26 are physical DAC types so output 0-3.3V analogue. I have arranged that these output voltages are set by the Pi03 settings, as though they were conventional PWM outputs.
-  * Port 21 (and Port 22, as used by the NoDAC speaker drive) are normally the I2C bus. But I select port 4 and 5 for the OLED I2C bus+  * Port 21 (and Port 22, as used by the NoDAC speaker drive) are normally the I2C bus. But I select port 4 and 5 for the OLED I2C bus, and 19 and 21 (again!) for the Second I2C drive. (the re-use of pin 21 is one reason why the code needs to reinitialize the OLEDS after the sound initialisation) ​
 If you have a serial terminal connected to the node when you start it up, you will see a Node setup display that should help you identify how the ports re set up.\\ If you have a serial terminal connected to the node when you start it up, you will see a Node setup display that should help you identify how the ports re set up.\\
  
users/dagnall53/esp32differences.txt · Last modified: 2019/03/17 19:45 by dagnall53