# Message Boards

Posted 1 year ago
2913 Views
|
5 Replies
|
0 Total Likes
|
5 Replies
Sort By:
Posted 1 year ago
 Hi. I've never used Pi but maybe i can help.First, in a previous post someone claimed it was a Mathematica issue and that their "packlet", if used, resolved the issue.http://community.wolfram.com/groups/-/m/t/1116486tell (us) the Output of In[n]:=FindDevices[] Make sure Pi is one of the devices and run examples to insure you can communicate with the Pi.I don't see the "Sense Hat" as one of the Wolfram Connected Devices, though because it's for Pi it may not need to be in the list as a separate device.The source code appears to connect to getfbdevice (ex. /dev/fb0) for visual output and uses IC2 (a bus protocol) to speak with the Pi.I can't see anything in the examples or source indicating the Sense HAT acts as a driver in /dev/xxx. What I see is python script examples that instructs the device what to display on it's grid display (the device has it's own pixel display).My concern is i see no specific driver "create to return only sense hat from the pi", for Mathematica or any program, to find. The python script itself uses the Pi driver. (that's found on the Sense Hat main page on Pi's website)However the device appears simple to use using (Linux and the Pi).in a python script one can read the hat and print data to a file (and mathematica can read files as (realtime) data): from sense_hat import SenseHat sense = SenseHat() raw = sense.get_accelerometer_raw() print("x: {x}, y: {y}, z: {z}".format(**raw)) print(sense.accel_raw) print(sense.accelerometer_raw) It seems like if you run commands in Mathematica to read the Pi, you can read your instrument by using those commands in the same ways the Python "library" does. Ask the Pi to return data, parse the data, use the data.
Posted 1 year ago
 Thank you for your advise ( two persons ) on my premitive question. Under your advise, I think in deep what is wrong.1) I am running Mathematica 11.0.1 within latest Jessie. But I put the command for upgrading my Raspbian-Jessie & Wilfram-engine - since I wouldkike to confirm I am using the latest code-libray of Raspbian(Jessie).2) I confuse that the coding style for both Python3 and Mathematice 11.0.1 are same, but this is BAD coding for Mathematice. On the Mathematice 11.0.1, it should be as below - 1st person show me "right coding on device-control". ------ sensehat= DeviceOpen["SenseHat"]  DeviceRead[sensehat,"temprature"] So, I could solve my problem and I leran that I need study more "Mathematica coding" thru the device control of SenseHat.Again, thak you very much Attachments:
Posted 1 year ago
 Hi,What version of Mathematica are you running? You will need 11.0.1 to use the SenseHAT driver. You may need to update your Raspian to use Jessie over Wheezy, which only supports 10.0.2 and doesn't include the SenseHAT. Once you are running under Jessie, you can then update Mathematica with: sudo apt-get upgrade wolfram-engine Thanks,Ian