Hi there
Ive recently purchased the Unexpected Maker ProS3 board. I wiped the board and uploaded my first test code, where I try to access the RGB Light.
Ive tried numerous tests but for some reason it still does not turn the light on or off.
Ive tried using the NeoPixel plugin, and Iǘe also tried doing a simple digitalwrite to pin 18
Would someone happen to have some sample code to access the RGB?
What is the code you are using for your first test?
Did you enable LDO2? The RGB LED is powered from LDO2, not LDO1.
I provide a helper for Arduino that has examples on how to use the RGB LED - which automatically enables the power for LDO2.
Info for the helper library is available here:
Seon
Unexpected Maker
5 Likes
Hey there. Sorry for taking a while to come back on this thread. The code I was running as as follows;
(Config.h defines 0 pixels and pin 18)
#include <Arduino.h>
#include "config.h"
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_RGB + NEO_KHZ800);
void setup() {
// Turn on the RGB LED
pixels.begin();
pixels.setBrightness(200);
pixels.setPixelColor(0,pixels.Color(255,0,0));
pixels.show();
}
Hi Seon
I also tried doing this;
//Turn RGB Light on
pinMode(LDO2, OUTPUT);
digitalWrite(LDO2, HIGH);
That would need to be 1 pixel to make it light. GPIO18 should be the right one for the LED. LDO2 needs to be enabled (GPIO17).
ah great. I did this and it’s working now!
#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_RGB + NEO_KHZ800);
void setup() {
// Turn on the RGB LED
pinMode(RGB_PWR, OUTPUT); // Enable the output
digitalWrite(RGB_PWR, ONHIGH); // Set Power on
pixels.begin();
pixels.setBrightness(200);
pixels.setPixelColor(0,pixels.Color(255,0,0));
pixels.show();
}
Thanks so much for this!
1 Like
Thanks for letting us know that you got it sorted.
1 Like
Aaron
9
Thanks @Jeff105671 for spotting that one.
Glad to see this got sorted out.
1 Like
Still easier to just do this
#include <UMS3.h>
UMS3 ums3;
void setup() {
ums3.begin();
ums3.setPixelBrightness(200);
ums3.setPixelColor(255,0,0);
}
4 Likes