Hey all,
Two days ago I started playing around with arduino, so I am completely new to the programming of the arduino board. also I don't know processing. (I do fine with webbased programming though, like actionscript & php)
However, I did get the blinking led sketch to work, and amended it to say "hello world" in morse, controlling a Relaysboard and a 230v lightbulb. All very exciting for my taste, however I need it to do a lot more: my Arduino's planned to become the beating hardware heart of my graduation installation.
So, now I run into a problem. My following code is accepted by Arduino 0003, by rejected by 0004. It says:
In function 'void loop()':
error: invalid conversion from 'const char*' to 'unsigned char
This is the code I have. Can anybody tell me what I am doing wrong?
int joyPin = 2;
int joyVal = 0;
void setup()
{
beginSerial(9600);
pinMode(joyPin, INPUT);
}
void loop()
{
joyVal = digitalRead(joyPin);
if (joyVal == HIGH){
serialWrite("A");
}
else{
serialWrite("B");
}
delay(100);
}