Message Boards Message Boards

DeviceWrite Error using remote development kit on RPi with Raspbian Jessie


I know there are older posts on the RDK (eg but I have decided to start a new one because they are old.

I have had full functionality with RDK and running a remote kernel on an RPi in the past, however have problems with it on an RPi 2 running Raspbian Jessie. I'm using Mathematica v10.3.0.0 on OSX.

I get an error when evaluating DeviceWrite on the RPi remote kernel. Other expressions evaluate without any problems eg $MachineID[]; 1+1 etc.

Has anyone seen this error before? Note: the output "18->1" does not actually turn GPIO 18 on.

DeviceWrite Error

DeviceWrite["GPIO", 18->1] runs successfully using sudo wolfram in the command line via SSH. Success via SSH RPi and LED

TL/DR Has anyone else had success/trouble with the RDK, DeviceWrite and Raspbian Jessie?

POSTED BY: Hans Schmidt
1 year ago


I’ve managed to get BinaryWrite to work (from Arnoud’s instructions via some buttons like this:

stream = OpenWrite["/sys/class/gpio/gpio18/value", BinaryFormat -> True]

Button["flash LED", task = RunScheduledTask[{BinaryWrite[stream, 48], Pause[0.5], BinaryWrite[stream, 49]}, .5]]

Button["stop Flashing", {RemoveScheduledTask[task], BinaryWrite[stream, 48]}]

But, I have also noticed that "/sys/class/gpio/gpio18/value” doesn’t seem to exist until I run DeviceWrite[“GPIO”, 18->1] on the command line either.

to be cont'd....

POSTED BY: Hans Schmidt
1 year ago

Group Abstract Group Abstract