Hi Bill. Thanks for this project - I now have a very cute little car that the folk at work find hilarious.
That TTGO display is gorgeous - the resolution is simply stunning. I loaded another demo sketch onto it, and wow. I just might have to buy another. I'm using a pair of AA-size LiPo's on the car, and a single AA in the remote. They all claim to be 800mAh, and so far are going fine.
I had a hassle with the car program not wanting to compile, but after a good night's sleep, I cleaned out previous downloads of the sketches, reloaded and now it works perfectly. It also helps to have the appropriate board selected. Also, perceived problems with a non-responding controller were fixed by actually wiring up the joystick. Sigh.
Thanks again
Andrew
I seem to have an issue getting my NEO_PIXEL LEDs to even light up. I've included some test code based upon Bill's code for showing his LED test. I'm using just one NEO_PIXEL LED. If I can get one to light up then I'll move on to the string of five.
Here is my test code:
/* NeoPixel Test script 2023/02/05 */ //Include NeoPixel library #include <Adafruit_NeoPixel.h> // NeoPixel string output pin #define NEOPIX_PORT 5 // Number of NeoPixels in string #define NUMPIXELS 1 // Name each LED for easier reference #define NEO_LED 0 //LED Color Definitions #define LED_RED 255, 0, 0 #define LED_GREEN 0, 255, 0 #define LED_BLUE 0, 0, 255 #define LED_YELLOW 255, 255, 0 // Create "pixels" object representing NeoPixel string Adafruit_NeoPixel pixels(NUMPIXELS, NEOPIX_PORT, NEO_RGB + NEO_KHZ800); void setup() { // Set up Serial Monitor Serial.begin(9600); // Initialize NeoPixels pixels.begin(); } void loop() { Serial.println(""); Serial.println("Looping..."); Serial.println(""); // Turn NeoPixel RED pixels.clear(); pixels.setPixelColor(NEO_LED, pixels.Color(LED_RED)); pixels.show(); Serial.println("LED should be RED"); delay(2000); // Turn NeoPixel GREEN pixels.clear(); pixels.setPixelColor(NEO_LED, pixels.Color(LED_GREEN)); pixels.show(); Serial.println("LED should be GREEN"); delay(2000); // Turn NeoPixel BLUE pixels.clear(); pixels.setPixelColor(NEO_LED, pixels.Color(LED_BLUE)); pixels.show(); Serial.println("LED should be BLUE"); delay(2000); // Turn NeoPixel YELLOW pixels.clear(); pixels.setPixelColor(NEO_LED, pixels.Color(LED_YELLOW)); pixels.show(); Serial.println("LED should be YELLOW"); delay(2000); }
It compiles with no errors, uploads, then runs with the serial monitor printing what color should be showing on the LED, but the LED has no color. Have checked wiring and it appears to be wired as Bill's diagram shows, with the exception I'm using an Adafruit 4 Channel level converter instead of a 2 channel device as Bill has. It seemed pretty straight forward wiring the 4 channel device as opposed to the 2 channel device, so I don't think that is my issue, but not 110% sure. Any ideas greatly appreciated.
SteveG
Try using the literal values instead of the #define colours. For example ...
Experience is what you get when you don't get what you want.
I'll give that a shot. Do you have any idea why the defines wouldn't work. Maybe I'm not holding my mouth the same way Bill was!
SteveG
No idea why it wouldn't work. But I've used them before and always used the literals. So, one step at a time.
Experience is what you get when you don't get what you want.
I was just reading it in detail and you may want to set the brightness as well (just in case). In setup() add
pixels.setBrightness(128); // 128 out of 255
Experience is what you get when you don't get what you want.
I'll give that a shot as well, thanks! Will advise, but it may be tomorrow before I can get back to it.
SteveG
OK, then I'll shut up until tomorrow 🙂
Experience is what you get when you don't get what you want.
Where did you mount the 330 ohm resistor driving the neo-pixel LEDS? I didn't see it mounted on your perf board.
UPDATE: After a closer look at the perf board from above before you actually start to explain the board, I finally spied the resistor between the ESP32 and the 5 neo-pixel connectors!
SteveG