2012-03-19, 15:16
(2012-03-19, 15:09)beta-j Wrote: So after trying out pretty much every option imaginable I decided to ignore the tutorial completely and work my way from the ground up in order to try and identify the problem.
I am using the simplest possible test setup:
I simplified (in my view) the Arduino code to the following:Code:int red, green, blue;
int redPin =9;
int greenPin =10;
int bluePin =11;
void setup()
{
Serial.begin(38400);
int red=255;
int blue=255;
int green=255;
}
void loop()
{
if (Serial.available()>=4) {
if(Serial.read() == 0xaa){
red = Serial.read();
green= Serial.read();
blue = Serial.read();
}
}
analogWrite (redPin, red);
analogWrite (greenPin, green);
analogWrite (bluePin, blue);
delay(10); //just to be safe
}
and my boblight.conf now looks like this:
Code:[global]
interface 127.0.0.1
port 19333
[device]
name arduino
output /dev/ttyACM0
channels 3
type momo
interval 20000
rate 38400
prefix AA
#arduino bootloader runs when opening the serial port for the first time
#delay transmission one second after opening so we don.t send shit to the bootloader
delayafteropen 3000000
debug on
[color]
name red
rgb FF0000
[color]
name green
rgb 00FF00
[color]
name blue
rgb 0000FF
[light]
name main
color red arduino 1
color green arduino 2
color blue arduino 3
hscan 0 100
vscan 0 100
The end result is that boblight is now showing some signs of life and seems to be actually working. My only problem is that the red LED does not light up at all for some reason. It's not a hardware issue as I tested it with a direct +5V and it lit up fine. Any ideas what it might be?
Does the red LED work on the other channels? Tried a smaller resistor?
I wouldn´t change the arduino code because a) the one from bobo1on1 is proven and b)you probably won´t get support from the devs when using some modified software code