MicroMod ESP32 Processor Board Hookup Guide
With the MicroMod Processors, you can change out the processors with little to no changes in the code. But because each processor board's architecture is different, the way communication protocols are initialized might be a little bit different. For the ESP32 Processor, the two main protocols are the Universal Asynchronous Receiver Transmitter (UART), aka Serial, and I2C, aka Wire.
Secondary Serial/UART Initialization Tips
The UART is initialized with the begin function as:
void begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert, unsigned long timeout_ms)
The primary UART works like any other Arduino board being able to initialize and send messages back to your computer over the USB cable using using
Serial.begin(115200) for a baud rate of 115200 as an example. If you wanted to communicate at the same 115200 baud rate on the secondary UART you would initialize
Serial1.begin(115200, SERIAL_8N1, RX1,TX1);
Or if you want to use the GPIO pin numbers instead, it would be:
Serial1.begin(115200, SERIAL_8N1, 16, 17);
Secondary I2C Initialization Tips
The Wire bus is initialized with the begin function as:
bool begin(int sda, int scl, uint32_t frequency); // returns true, if successful init of i2c bus
With the primary Wire bus, these pins use the default SCL and SDA pins connected to GPIO pins 22 and 21 and can be initialized by simply calling
Wire.begin(). If you plan on using the secondary Wire bus, you need to provide the pins, and possibly the desired frequnecy if the default 400kHz is too fast. For most applications though you can use:
Or if you wanted to use the GPIO pin numbers, it would be:
If you need technical assistance and more information on a product that is not working as you expected, we recommend heading on over to the SparkFun Technical Assistance page for some initial troubleshooting.
If you don't find what you need there, the SparkFun Forums: MicroMod are a great place to find and ask for help. If this is your first visit, you'll need to create a Forum Account to search product forums and post questions.