Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Tested under Ubuntu. You only need to add Perl Device/SerialPort.pm to your Linux box. If you are using Windoz please change /dev/ttyACM0 with your COMx: port.
RPC PERL Sample
#!/usr/bin/perl use Device::SerialPort; # # Lets set the comm parameters with MBED # my $port = Device::SerialPort->new("/dev/ttyACM0"); $port->databits(8); $port->baudrate(9600); $port->parity("none"); $port->stopbits(1); # #Lets define RPC object # $port->write("/DigitalOut/new LED1 myled\n"); # # Blink LED1 # while(1) { $port->write("/myled/write 1\n"); sleep(1); $port->write("/myled/write 0\n"); sleep(1); }