Posts

Showing posts with the label Serial

Can you spare a 200 bytes? When enabling Serial is enough to crash an Arduino app

I have an old piece of Arduino code that doesn't work if I enable Serial Output.  The code consists of 3 main pieces:  Ethernet/Web server Neopixel driver 5110 LCD display The code runs fine if I disable Serial output or if I remove the 5100 LCD display code and libraries. Note that the Arduino doesn't actually boot correctly and initialize the displays so this is even before any web server requests.  I couldn't figure out what was happening until I looked at the compiler output. It turns out that Serial() reserves about 200 bytes for input/output buffers. This makes sense but pushed me over the edge. I don't have a good way to figure out the minimum I need but obviously, 234 bytes isn't enough.   Code Used https://github.com/freemansoft/build-monitor-devices/tree/main/arduino_ethernet_NeoPixel Compiler Messages This is the Arduino compiler output with just the following line in the code or commented out.  These numbers were captured after moving all c...

Installing a serial port connector on the Chumby/Infocast

Image
Overview Both the Infocast 8" NS-DP8CH and the Infocast 3.5" NS-DP3CH have 3.3v TTL level serial ports available on connector ports on the motherboards. The serial ports come with transmit (TX), receive (rx) and ground connections and are enabled by default by the Chumby operating system as the boot log on startup and as a serial based terminal after boot.  Traditional computer serial ports operate at different voltages and modern computers often have no serial ports at all.  Developers and users can connect to the Chumby through the use of a USB to 3.3v serial device adapter cables.  Pre-made ftdi brand cables are available on the internet but a lot of folks hack up cheap or surplus USB-cell phone cables like the Nokia. The Chumby is a 3.3v system so don't use a 5v cable. Search on the internet for appropriate cables. USB to serial cables appear to operating systems as (virtual) COM ports.  Mine shows up as COM4 on my Windows 7 machine.  Many terminal emulator...