Continued working on my Lora prototype. Made a (probably inaccurate) schematic and Eagle file. I was very surprised that I managed to stuff most of it in a 12-pin chip!! Apart from 2 SPI modules, I could fit 3 buttons and 1 LED with the rest of the free pins.
Designed my first double-sided board.
There were so many issues along the way!!!!! I’m going to ramble:
Dual communication problem
When both boards were running on Arduino Nano 33 IoTs, I had dual communication problems with the RFM9x Lora modules. The receiver got a message, and responded, but the transmitter was not getting a response back.
- Solution: changed the receiver end to an Arduino Uno (running on 3.3v), and it worked.
- I read about how RFM9x had 3.3v logic, and Arduino Uno has 5v-3.3v logic level converter. But it was confusing because I thought Arduino Nano 33 IoT should also have 3.3v logic??? Also why was the transmitter fine???
- Apparently Arduino Pro Mini or a logic level converter was a common sentiment. I don’t have any of these. WoIrried how this would impact my PCB.
SSD1306 library takes up too much RAM space
When I first tried to used the SSD1306 library for the OLED screen alongside the Radiohead library for Lora, the whole thing would freeze. Apparently every time the OLED screen refreshes it uses 128 * 64 = 1024 bytes of SRAM, and Arduino Uno/Nano only have 2k SRAM!!
- Solution: changed to SSD1306Ascii library, somehow it avoids the refresh buffer?
- But now the texts have no line break and are tiny 🙁
- ATtiny has even SMALLER SRAM (ATtiny84 has 512), which makes me very worried.
I2C SPI conflict
Apparently ATtiny doesn’t support doing I2C and SPI at once cause they share the same pins. Instead of quick and easy I2C I had to do SPI connection for the OLED as well??
What’s with the D/C CLK DATA in the OLED SPI pins???
What’s the difference of Vcc / Vdd / Vin ???
Also how do i mesh ???