1.28" LCD Gauges - for NA Miata's and Other Cars.

by morego815 in Circuits > Arduino

14073 Views, 101 Favorites, 0 Comments

1.28" LCD Gauges - for NA Miata's and Other Cars.

PXL_20220731_021439720-1.jpg
1oqh2s4hjjt21.jpg
s-l500~2.jpg

While searching for some other items these 1.28 round LCDs popped up and I knew when I saw them that they would be perfect for this application. These pop right into place of the OEM NA Miata (89-97) gauges (and probably other cars as well) and only require a few components to drop voltages to get them working. If you have a 94-97 NA you'll also need to replace the oil pressure switch with an oil pressure sensor, I picked up a used one from eBay. The code was the toughest part but standing on the shoulders of great coders like Bodmer made getting them working easier.  

I recommend gathering all of your components and doing some bench testing before even removing the cluster from the car. Doing this first will reduce the amount of time your car will need to be without gauges, and while it can be done I’d recommend not driving without them installed.  You'll also want to document what your gauge readings are before you remove the cluster to use as a reference for calibrating later. Take notes and/or pictures of the gauges after running for a while, when everything is up to operating temperature.

I started working with Arduino Nano, but hardware, software and size limitations drove me to look around to see what else I could find. I stumbled on the really compact and powerful Seeedunio XIAO from Seeed Studio. They are really affordable while being packed with power, the small size helped with fitting them into the space where the OEM gauges lived. Seeedstudio has multiple versions of the XIAO, I used the SAMD21 version to keep it simple. You could use any Arduino/esp32 compatible microcontroller and run all three gauges from a single controller but I preferred to have the redundancy at each gauge so that if something did go wrong I might lose one gauge instead of all three. 

I found these small buck style voltage converters after trying a couple other methods to drop the voltage to the required levels. These are nice because they have solder pads on the back that allow you to lock them into a number of different voltages. For this project we need 5v to power the XIAOs and a 3.3v to trigger the gauges to dim with the indicator illumination, and these converters will do both.

You’ll also need some wires for making connections, I used some jumper wires that I got from amazon. I also used some 4 pin connectors to make the connections a little cleaner and easier. I used a diode on each gauge to prevent voltage back feed when uploading code to each gauge. And you’ll need some resistors to create a voltage divider for each sensor.

I wanted to be able to flash new code to them without ripping the dash apart so I added USB ports to the bottom of the gauge pod for each gauge. I got USB-C male and female connectors from amazon and made USB extension cables to connect to each gauge.

I designed and 3d printed the mount that fits into the OEM gauge location. I chose to do it this way to make sure there wouldn’t be any light leakage around the rings from the backlights inside the cluster. I also wanted to mount the XIAO to the back of the LCD to keep things compact and organized. I've used both an SLA and FDM printer for these parts and they came out great on both style of printer.

Supplies

Tools wise there isn't anything too special needed.

  • A soldering iron and solder are necessary
  • Wire cutters/strippers
  • Razor or exacto knife
  • Helping hands or other holding device can be really helpful
  • Drill with 1/8" drill bit
  • Phillips head screwdriver
  • Small flat head screw driver

The mounting brackets are 3D printed, you don't necessarily need to have a 3D printer, but you do need access to a printer or someone with a printer.


I got some of these components from other places but everything is available on amazon except for the 3D printed parts (STL included). I’ll include the links to where I got my parts.

For each gauge you will need - 

1 - 1.28 IPS LCD - https://www.makerfabs.com/gc9a01-1.28-inch-round-lcd-module.html

1 - Seeedunio XIAO - https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html

1 - 4 pin connector - I used these but any small 4 pin connector should work https://www.amazon.com/Connector-Female-Cable-Light-Strip/dp/B07VBRRPZ2

1 - USB-C Male & Female Connector - https://www.amazon.com/ANMBEST-Connector-Receptacle-Adapter-Support/dp/B091CRLJM2

1 - Buck converter set to 5v - https://www.amazon.com/Regulator-Voltage-Adjustable-Converter-Transformer/dp/B08Y674Z6F

1 - Diode - https://www.amazon.com/MIC-Silastic-Junction-Standard-Rectifier/dp/B00W17LOBO

1 - 150 ohm resistor - https://www.amazon.com/Projects-25EP514150R-150-Resistors-Pack/dp/B00B5KZN92

1 - 300 ohm resistor - https://www.amazon.com/smseace-Resistor-Tolerance-Projects-Experiments/dp/B08P2PVQ2H

3 - #6-32 x 1” machine screws and nuts - I had longer screws around and cut them down. Lowes or Home Depot have them in different lengths, or you can get them on Amazon.

3 - Ring terminals - I had these around in a connectors kit but the smaller the better as long as they fit onto the #6-32 screws. The ones I had were similar to these, I pulled the red insulation piece off to make them a little smaller. https://www.amazon.com/Hilitchi-Insulated-Electrical-Terminals-Connectors/dp/B01D82U3PS

1 - Mounting Ring - Links to STLs Below

Double sided tape for mounting components - https://www.amazon.com/15mmx25mx0-25mm-Conductive-Electronic-Components-Durability/dp/B099K97XLR

Misc wires and heat shrink - https://www.amazon.com/EDGELEC-Breadboard-Optional-Assorted-Multicolored/dp/B07GD2BWPY

I prefer the adhesive lined heat shrink but any heat shrink will work. https://www.amazon.com/Ginsco-270Pcs-Shrink-Adhesive-Tubing/dp/B073R69KNB

Silicone for mounting - I had a tube of DAP Dynaflex Ultra around so I used that but any silicone should work, I’d recommend using black just to help block the backlight from coming through.

https://www.amazon.com/Permatex-81158-Silicone-Adhesive-Sealant/dp/B000AL6WLA/ref=sr_1_10?keywords=black+silicone+caulk&qid=1659564963&sprefix=black+silicone%2Caps%2C66&sr=8-10


For the dimming function you can use one converter to control multiple gauges, you’ll need - 

1 - Relay - https://www.amazon.com/Nowepai-Power-Relay-HK19F-12V-Yellow/dp/B09BVS5L8X

1 - Buck converter set to 3.3v - Same as 5v above

Misc wires and heatshrink


You’ll also need a potentiometer for bench testing.

1 - 100 ohm potentiometer - (for testing only) https://www.amazon.com/TWTADE-Potentiometer-Single-Variable-Aluminum/dp/B07DHGHQPQ

Prepare and Connect XIAO and LCD DIsplay

PXL_20220711_234509567-1.jpg
PXL_20220724_185604318.MP-1.jpg
PXL_20220708_002320395-1.jpg
Screenshot 2022-08-04 170857.jpg

First things first, if you buy the unsoldered version of the XIAO, solder the pins into the XIAO. I put the pins in facing up (as shown in the first picture) to allow for easier mounting and connecting.  

I cut jumper wires with female ends at about 3 inches long and soldered the wires to the LCD. Rather than put the wires through the holes, solder them flat to the back side of the display board (as shown in picture 2), this will prevent them from interfering with the ring fitting around the display on the front.

Connect the display to the XIAO - 

  • 0 - 
  • 1 - LCD CS
  • 2 - LCD DC
  • 3 - LCD RES
  • 4 - 
  • 5 - Dimmer input (3.3v from relay)
  • 6 - Blue Wire from voltage divider center
  • 7 - LCD BLK
  • 8 - LCD SCL
  • 9 - 
  • 10 - LCD SDA
  • 3V3 - LCD VCC
  • GND - LCD GND
  • VCC - 150 Ohm resistor from voltage divider

Setup Software and Code

PXL_20220804_223003013.MP.jpg
PXL_20220805_122849968.jpg

Get together the necessary code, you’ll need Arduino IDE, and a couple of libraries to get things working.

Down toward the bottom of this link is the setup info and links for setting up the XIAO and Arduino IDE in the Getting Started section.

https://wiki.seeedstudio.com/Seeeduino-XIAO/

TFT_eSPI Library - Open library manager in Arduino IDE (Tools > Manage Libraries...) and search for and install TFT_eSPI (you may have to scroll down to find it).

Once installed you will need to make a couple of modifications in order to get the library working, as it was meant for several types of displays and processors.

Here is what you need to do:

  • Use your File Manager (Finder on a Mac) to navigate to your Arduino Libraries folder, which is inside your Arduino folder.
  • Look for the TFT_eSPI or TFT_eSPI_master folder. Open it once you find it.
  • Inside the folder, you’ll find several files. Look for the User_Setup.h file.
  • Open the User_Setup.h file with a text editor.

Once you have opened up the User_Setup.h file, you will need to make the following edits:

  • On line 45 comment out (i.e. add “//” in front of the text) the line defining the ILI9341 driver.
  • On line 65 uncomment (i.e. remove the “//”) the line defining the GC9A01 driver.
  • On lines 205 through 209 comment out all the SPI definitions for the ILI9341.
  • On line 216 uncomment and set MOSI to 10.
  • On line 217 uncomment and set SCLK to 8.
  • On line 218 uncomment and set CS to 1.
  • On line 219 uncomment and set DC to 2.
  • On line 220 uncomment and set RST to 3.
  • On line 221 uncomment and set BL to 7.

You can now save the file and are ready to use the library with your GC9A01 display.

Plug the XIAO into your computer, make sure the correct port is selected in Arduino IDE (Tools > Port > ), your port number will vary, and upload one of the example sketches by going to File > Examples > TFT_eSPI > Tools and diagnostics - Colour_Test is a good one to run to check that everything is connected and configured properly. In Sprite > One_bit_Sprite_Demo is another good one.

Bench Testing

PXL_20220712_014609804.jpg
PXL_20220712_000821548.jpg
Screenshot 2022-08-04 170733.jpg

Once you have the examples working, build a voltage divider by connecting one 150 ohm resistor to one 300 ohm resistor and adding wire like the first picture shows, use jumper wires with females ends so that you can plug into the pins on the board. Make sure that the black wire from the 300 ohm resistor goes to ground and the yellow wire from the 150 ohm resistor goes to VIN on the board or the voltage output will be wrong and your sensor readings will be incorrect.

The blue wire from the middle of the voltage divider goes to PIN 6 on the XIAO and to the middle post of the potentiometer. One of the outer posts of the potentiometer also needs to connect to ground.

Now upload the Oil or Gas ring meter sketch to the XIAO, the Temperature gauge requires a much higher resistance range so you can’t test with it unless you use a 0-10K ohm potentiometer.

If all is correct when you turn the knob on the potentiometer the gauge reading should go up and down.

We’ll dig into some of the details of the code, and how to make adjustments to colors and settings in a later step.

Disconnect your test setup and move on to assembling the cluster connections.

Straighten the wires and resistors connected to the voltage divider so that you can cover the resistors and exposed solder joints of the assembly with heat shrink.

Cluster Connections and Mounting Ring

41ZVbRwKOoL._AC_F.jpg
61aa3-WSQ8L._AC_SL1500_F.jpg
PXL_20220731_200057559.jpg
PXL_20220731_200217668.jpg
PXL_20220802_222622565.MP-1.jpg
PXL_20220712_222938955.jpg
Screenshot 2022-08-04 173549.jpg

Use the female side of the 4 pin connector and solder the red wire to the VIN pad on the bottom of the XIAO. The black wire from the 4 pin connector will need to be split to connect ground for the voltage divider and the XIAO. Strip a small spot in the middle of the black wire and solder the black wire from the voltage divider to it to make a Y connection. Remember to slide heat shrink onto the wire before making the solder connection, then slide heat shrink over the solder joint and shrink in position. Then solder the other end of the black wire to the GND pad on the bottom of the XIAO.

The blue wire from the 4 pin connector will go to the blue wire from the voltage divider, and the green wire will go to PIN 5 on the XIAO. I harvested a female jumper end to make this connection.

You can now add the mounting ring and back piece to the LCD and mount the XIAO to the back piece. The pins on the ring have a small rib on them that is there to keep the pins straight while printing. These ribs will need to be removed with a razor blade or exacto knife, I broke a couple of pins while trying to remove the rib and had to re-print the rings, so be careful. Now would be a good time to remove the protective film from the LCD, then install the ring by inserting the pins through the holes on the LCD board.  I then used a little dab of crazy glue on the pins of the ring and glued the back piece to the ring. Mount the XIAO to the back piece with the double sided tape, I stacked a couple layers of tape because of the solder from the pins on the bottom.

Remove Cluster and OEM Gauges

COMPLETE AND DE-MYSTIFIED REMOVAL OF A NA MIATA INSTRUMENT CLUSTER AND HOOD
cluster back - clips.jpg
cluster back- screws.jpg

At this point you're ready to pull the cluster from the car and install the gauges. I’m not going to go into detail on how to remove the cluster. There are tons of tutorials and videos on how to do that. Here is a link to a good video of the process. https://www.youtube.com/watch?v=QOOFXb-XhS8

Basically, remove the steering column cover, then the gauge hood (very carefully, they get brittle and are expensive to replace), then you can remove the gauges. I also removed the knee panel below the steering wheel to access the USB connections I add to the bottom of the cluster.

Once you have the cluster out of the car, use a small screw driver or pick to pop the clips around the outside that hold the lens on. Try to do this in a somewhat clean area, any dust or dirt that gets into the cluster can be tough to remove without making smudges and fingerprints. You may want to wear gloves or at least make sure your hands are clean before popping the cluster open.

Remove the screws that hold the OEM gauges into the cluster assembly and remove the gauges. Each one has 3 screws.

Where the screws for each gauge were mounted we will get our power, ground, and sensor signals. Each one is labeled on the backside of the cluster, IGN is +12v, G(-) is Ground, and the other is the sensor connection for each gauge. Fuel level is labeled FUEL M, Oil pressure is OIL.U and coolant temp is UNIT.  

Cluster Wiring

41ZVbRwKOoL._AC_M.jpg
61aa3-WSQ8L._AC_SL1500_M.jpg
52e35500cac5caa0060e466b8da2e7e7235669b8.jpeg
PXL_20220723_171500129-1.jpg
PXL_20220730_143124287-1.jpg
PXL_20220723_202422086.MP.jpg
PXL_20220730_144628644-1.jpg
PXL_20220730_143908157-1.jpg
PXL_20220730_143135636.MP.jpg
Screenshot 2022-08-04 173122.jpg
51F0HeuEFBL._SL1200_.jpg

You may want to de-pin the wires from the male 4 pin connectors and make the connections inside the cluster and then put them back into the connectors. If you do just make sure they go back into the correct locations so the wire colors match up when you connect the male and female connectors.

Now get the buck converters ready to go in by cutting the connection on the back side (circled in red in the first picture). I used an exacto knife to cut and scrape away the connection. I then used a multimeter to make sure the connection was severed. Then drop a little solder on the pads for the voltage required. Each gauge will need 5v for power, so 3 at 5v if you're doing all three gauges, and then one for the dimmer signal at 3.3v.

For the dimmer signal I carefully scraped off some of the coating on the traces for the power (ILL+) and ground (ILL-) for the cluster light on the back near the temp gauge. Gently scrape until you see the copper and solder a couple wires to those spots and then push the wires through to the inside. The little opening shown in picture 4 worked great.

Stick the dimmer relay in place, I ended up using hot glue to mount the relay because the double stick tape wouldn’t stick to the inside of my cluster thanks to some oily gunk from a previous owner.

The wires that we soldered to the traces on the back go to the coil to trigger the relay. These are double pole double throw relays but we only need to use one of the circuits, there will be three connections that won’t be used.

Solder 3“ long wires to the IN+, GND and VO+ pads on the 3.3v converter, I used red for IN+, black for GND, and white for VO+. Use double stick tape to mount the 3.3v converter to the side wall of the cluster. 

Solder VO+ to the normally open relay pin. Solder a 3” piece of black wire to the normally closed relay pin. (see Picture 11)

I used some small white wire to connect the output pin from the relay to all three gauges. This will split off and go to the green wire in the 4 pin connector for each gauge. Heat shrink any bare connections to prevent shorting. The unused pins on the relay I just bent over to keep them out of the way.

Solder 3“ long wires to the IN+ and GND pads on to the 5v converters, I used red for IN+ and black for GND. Cut the leads on the diode and solder to the VO+ pad, make sure the line printed on the diode is on the correct side (see picture 10), slide heat shrink onto the red wire from the 4 pin connector, then solder to the diode. Slide heat shrink over diode and solder connection and shrink in place.

You should be left with a bunch of loose red wires that still need to be connected. Red wires go into ring terminals and go to the +12v screws, don’t forget to include the red (IN+) wire from the 3.3v converter. Trim wires so that they reach the screw holes with a little bit of slack, then strip the ends and crimp into ring terminals.

Black wires also go together into ring terminals and go to G(-) screws, don’t forget to include black wires from the relay and 3.3v converter. Again trim wires so that they reach the screw holes with a little bit of slack, then strip the ends and crimp into ring terminals. 

Put ring terminals on #6-32 screws and insert through each hole and tighten in place with a nut on the back side.

The blue wire from each 4 pin connector gets a ring terminal and goes to the sensor screw for each gauge (Fuel level is labeled FUEL M, Oil pressure is OIL.U and coolant temp is UNIT).

Cluster Test & Gauge Mounting

PXL_20220723_212617390.MP.jpg
PXL_20220724_185512116.jpg
PXL_20220724_185604318.MP-2.jpg
PXL_20220724_185535330.MP-1.jpg
PXL_20220724_190158429.jpg
PXL_20220724_190124687.jpg
Screenshot 2022-08-04 173750.jpg

This would be a good point to stop and power everything up to check that it all works. You’ll need a 12v power source. Connect the 4 pin female connectors from each gauge to the 4 pin male connectors in the cluster. Connect your +12v power source to any of the screws on the back that say IGN and -12v to any G(-) screw and the gauges should start up. (reading will be wonky since there are no sensors connected). Make sure you’ve flashed one of the test or gauge sketches to the XIAO or nothing will show on the screens.

With 12v still connected to IGN and G(-), you can also carefully test the dimming function by putting 12v to the solder connections on the traces we soldered to on the back. This should light up the cluster backlights and trigger the relay to dim the gauges.

If the gauges work, marvel at your creation for a few minutes then disconnect them and grab your silicone and mount the gauge assemblies into the cluster lens. Don’t forget to remove the protective film from the LCDs if you haven’t already, they're quite a pain to remove after you mount them, ask me how I know….. I ended up mounting the oil gauge upside down from the others because there wasn’t enough room to connect the USB wire with the port on the XIAO facing down.

Make sure to silicone around the entire mount or light will leak through from the cluster back lights. I knew this would annoy me so I shined a flashlight around the backside of each gauge and kept adding silicone until I couldn’t see any more light coming through. You will need to remove the defroster indicator light to get all the way around the fuel gauge, but you can put it back in once you are done.

USB Wires and Connectors

PXL_20220725_214759429.MP.jpg
PXL_20220725_214805296.jpg
PXL_20220725_214814558.MP.jpg
PXL_20220725_214827792.MP.jpg
PXL_20220725_215944587.jpg
PXL_20220731_194607815.MP-1.jpg
PXL_20220730_143350628.jpg
PXL_20220730_143911901.MP.jpg
PXL_20220730_144628644.jpg

Time for the USB-C connectors. You can see in the first two pictures where I marked the bottom of the cluster before I removed it to get an idea of where I could fit the connectors and still reach them from under the dash. Mark locations for the female connectors on the bottom of the cluster.  A ⅛” (.125) drill bit is the perfect size to fit the connector. Use the connector to mark the outside edges. Drill two holes and use a razor or exacto knife to cut the middle out. Test fit the connector and trim to fit, keep it tight but not so tight that it crushes the connector.

You may need to remove the Tachometer or Speedometer, to get the connectors in place. If you remove them be sure to put them back in before gluing the connectors in place so that they don’t interfere with re-installing the gauges.

I had to make a notch in the bottom of the speedometer to fit the connector for the temp gauge. You could move the connector over a little more and avoid that tab at the bottom of the speedometer. If you move the temp gauge connecter over to about where my blue line is it should clear the speedometer and still be accessible when the cluster is in the car.

Cut wires the approximate length of the distance from the female connector to where each gauge will be, leaving a little extra. Each connector requires 4 wires. Solder wires to the female connectors and glue in place. Crazy glue worked really well but you may need to use a little hot glue to make sure these are mounted firmly and won’t come loose when you plug and unplug the cable from the outside. If you can heat shrink over the connections you should but in my case there wasn’t enough room.

Now solder the male connectors to the other end of the wires making sure to connect each one correctly, V to V, D+ to D+, D- to D-, and G to G. Add heat shrink over these connections.

This is another good point to stop and test these USB wires. You may need a USB-A to UBC-C cable for these wires to work. I tried initially with a USB-C to USB-C cable and they didn’t work. Plug the male USB connectors from the cluster into the gauges. Plug your computer into each female connection on the bottom of the cluster and each gauge should start up individually. If the gauges start up when you plug into the USB ports you should be good but I'd recommend trying to flash a sketch to each one just to be sure that the data connections are working and not just the power connections.

Cluster Reassembly and Final Test

PXL_20220730_154217629.jpg
PXL_20220726_013620059.MP.jpg
PXL_20220726_014113254.jpg
PXL_20220730_165456377.MP.jpg

If everything works you should be ready to reassemble the lens to the cluster. Check to be sure you haven’t left any smudges on the inside of the lens and that any dust is removed. Also make sure you don't leave any marks on the face of the tach or speedo. They are tough to clean so try to avoid this.

Also also make sure you didn’t bump the speedometer needle like I apparently did at some point and didn’t notice until everything was completely assembled and back in the car. Easy to fix, just spin the needle back around counter-clockwise until it’s set at zero again. Unless it's already installed in the car at which point you'll have to try to do what I did and remove all the trim pieces and try to pop the lens off again to spin the needle back around.

Make sure to connect each 4 pin connector and USB wire. Feed the defroster light wire back through its opening in the back. Tuck the wires in as you put the lens onto the cluster and make sure none of the wires are in front of the tach or speedo. There always has to be that one guy……

Once it’s all assembled It’s probably a good idea to test everything out one last time before putting it back in the car. Connect a 12v power source to the IGN and G(-) screws just like earlier and make sure the gauges start up. Then disconnect the 12v and plug in to each USB connection on the bottom to make sure you can flash each gauge with new code. (Note the upside down oil gauge, I hadn’t updated the code yet but it’s really easy to adjust the orientation in the sketch code.)

If all checks out, re-install the cluster in the car and put all the trim pieces back. 

Calibration Checks

PXL_20220730_170530817.jpg
PXL_20220731_021439720.jpg
Screenshot 2022-08-04 174529.jpg

The gauges should be relatively close to calibrated using my code, I spent a few weeks making adjustments to improve the accuracy, but if they seem to be really way off you can adjust the code to get the readings closer.

If you have an ODB2 car you can use a Bluetooth OBD reader to check the coolant temp, or use a thermometer to check the temperature at the thermostat housing. Check at a few different times like a few minutes after startup and then again once the engine has run for a while and is up to operating temperature. 

Fuel is pretty easy, check to see what the gauge says, then fill it up. If the gauge says 2 and it takes ~9 gallons to fill it you should be pretty spot on since the car has 11.9 gallons of fuel capacity. You could adjust it to get closer to exact but I don’t mind having a little “hidden” reserve. 

Oil pressure is a little tougher, your best bet if you have an actual oil pressure gauge and not the "dummy gauge" (94-97) is to make note of it before removing the OEM gauge. Keep track for a while of what the reading is at idle when the engine is up to temperature and then calibrate the new gauge to be close to that. If your using an OEM oil pressure sensor my code should be pretty accurate.

In the last picture I highlighted the line in the code where the calibration is controlled. The first two values are the sensor readings, the last two are what will be displayed at those values. So in this example If the sensor value (which is the small number displayed at the bottom on the gauge) is 30, the gauge will show 120 psi, if the sensor value is 490, the gauge will show 0 psi. If you were to see a reading before you start the engine that isn't 490, you could change that value to what the gauge shows the sensor reading is and that would change the 0psi calibration.

All of the gauges have the same calibration code and can be adjusted the same way. These can be set at any value, say you notice at idle that the sensor value shows 350, but the gauge is reading 70psi. You would change the 490 value to 350, and the 0 value to whatever you think the oil pressure should be at idle. These two sets of values are your calibration points and are used to map the sensor reading to the gauge reading. They can be any two readings, just be sure to maintain the nomenclature of value 1 & 3 = HIGH pressure/temp/fuel level, value 2 & 4 = LOW pressure/temp/fuel level or the gauges will read all wonky.

Code Details

Screenshot 2023-01-24 180644.jpg

The code attached to step 3 is the code as I'm running it right now. Feel free to offer up suggestions for improvements, I'm sure it could be better. I tried to make good notes in the code to point out the places where things like the gauge labels, calibration settings and color settings are located. There is a link at the very top of the code to a good color code generator that you’ll need to set new colors outside of the default list.

I mentioned earlier that the small numbers at the bottom are the raw data from the sensor, and once you are satisfied with the calibration it can be turned off by commenting out (add // in front of the lines of code) the two lines highlighted in the picture above.


Links to all of the resources I used to get this project working.

https://www.instructables.com/Arduino-analogue-ring-meter-on-colour-TFT-display/

https://dronebotworkshop.com/gc9a01/

https://www.zonnepanelen.wouterlood.com/28-esp32-wroom-32-and-ili9341-tft-display-an-interesting-match/

https://github.com/Bodmer/TFT_eSPI