Dear all,
wondering if you could help me out - im at my wits end!
I have one of the following - Milinst.com is available at DomainMarket.com. Call 888-694-6735
which I have hooked up to Serial1 on an Arduino Mega.
Im trying to send data to the port using serial1.println, but the unit is not responding.
The equivelant perl commandings are here - Dan McGrath - Automated Lighting
send data out
$port->write( pack "C", $channel ) ;
$port->write( pack "C", $intensity ) ;
sleep(1) ;
Which accoring to the perl docs means pack as an unsigned char (octet) value for chan, send it, then do the same for intensity.
I'm having trouble replicating this, and the only thing I can thing is that its related to how the arduino is handling the serial output.
I've tried the following commands out of desperation, but to no avail, any thoughts?
void setup()
{
unsigned char myChar = 3;
unsigned char myChar2 = 255;
Serial.begin(9600);
Serial1.begin(9600);
Serial.println(myChar);
Serial.println(myChar2);
Serial1.println(myChar);
Serial1.println(myChar2);
}
(im outputting to serial and serial1 so i can verify what it is sending)
Thanks
Scott