Message Boards Message Boards

GROUPS:

DeviceWrite Error using remote development kit on RPi with Raspbian Jessie

Posted 2 years ago
2229 Views
|
1 Reply
|
0 Total Likes
|

I know there are older posts on the RDK (eg http://community.wolfram.com/groups/-/m/t/163395) 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 2 years ago

Update:

I’ve managed to get BinaryWrite to work (from Arnoud’s instructions http://community.wolfram.com/groups/-/m/t/157473) 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....

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract