Message Boards Message Boards

Wolfram Data Drop and the Raspberry Pi for Education

Yesterday, Stephen Wolfram announced the release of this great solution for storing and sharing data coming from sensors, devices, programs, humans or anything else: the Wolfram Data Drop. I think this is a turning point; it completely changes the game on how I've been interacting with streams of data. In this post I want to share with you three ideas that I've been exploring using the Raspberry Pi 2, which, by the way, it runs Mathematica about 10x faster than its predecessors!

Data Drop on the Raspberry Pi enter image description here enter image description here

The first idea that came to my mind was to revisit some of the experiments I had carried out in the past, like this home alarm system. In a matter of minutes, I was able to set up an activity tracker for my home's hall. Every time I pass by, the PIR motion sensor adds a 1 to the "mov" variable that is being dropped to this databin every 20 minutes. Check it out in W|A, it's live and growing! == Data drop 3v1UbpOM

My home hall's activity Periodic entries

This is such a great thing, that dataset is just about me but it could be monitoring whatever you want, like your cat's crazy habits. For this example the data is being logged periodically but you could set it up in an event-based manner. Like here, whenever a movement is detected, it triggers the RaspiCam and it sends the snapshot to the following databin:

RaspiCam Databin Cumulative Activity Plot

What about making a several days long time-lapse of you?

Daily work at home

Or what about using other sensors? The possibilities are just endless!

Finally, let me end up with the following collaborative activity for the classroom. Here is how you can carry it out.

First, you create a public databin to add two different names of animals that the students will enter:

CreateDatabin[ "Interpretation" -> {"animal1" -> "Animal", "animal2" -> "Animal"}, <|"Name" -> "Classroom Zoo"|>]

Then, ask your students to submit their favorite animals' names, using the web-based platform

Add new entry

Their individual entries will ended up generating things similar to this amazing Graph!

data = Values[Databin["3zCzVgPJ"]];
pairs = Apply[Rule, Drop[Transpose[{data["animal1"], data["animal2"]}], 9], {1}]

Name pairs

pics = Map[# -> #["Image"] &, Union[Flatten[Drop[Transpose[{data["animal1"], data["animal2"]}], 9]]]];
style ={ VertexSize->1.2,EdgeStyle->Directive[Arrowheads[{{.02,.6}}],Hue[.4,1,.3]],VertexShape->pics};
Graph[pairs, style, ImageSize -> 900]

Animals Graph

Please, give it a try. Later, we will see what the giant graph ends up looking like. Or even more fun, share with us your ideas or databins that you want to be filled out collaboratively!

POSTED BY: Bernat Espigulé
7 Replies
Posted 9 years ago

Hi, I am trying to upload temperature and humidity data from DHT 22 sensor connected to Raspberry pi into the Wolfram Datadrop. I read the GPIO documentation. I understand GPIO DeviceRead command gives the value one or zero.I used the following


I am getting 4-> -1 i want to read the temperature and humidity value from DHT22 sensor.I am not sure how to achieve it. Please guide me.

POSTED BY: Priya Sivaraj

Here is how I've made the following time lapse:

Wolfram Pi Flowers

POSTED BY: Bernat Espigulé

CloudConnect was what I was missing. Now it works thanks


POSTED BY: Ken Levasseur

The code I evaluated was

DatabinAdd[Databin[BinID], DeviceRead["RaspiCam"]]

where BinID is the 8 character ID I got when I created the bin. I would expect that there is some longer secret code needed but that isn't clear to me.

POSTED BY: Ken Levasseur

Ken, I know what's going on here. You are no longer connected to the Wolfram Cloud, right? Try this:

CloudConnect[ "email-wolframID" , "password" ]
DatabinAdd[Databin["BinID"], DeviceRead["RaspiCam"]]

I wasn't able to reproduce your error, but then I logged out from the Wolfram Cloud with


and when I tried DatabinAdd, I got the error reported by you:

Databin::apierr : An API must be specified
POSTED BY: Bernat Espigulé

I created a Databin in Wolfram Cloud and then tried evaluating the example with my Raspberry Pi that was provided in the introduction, using my DataBin ID. I got this error:

Databin::apierr : An API must be specified

It isn't clear to me how the API is specified in the example.

POSTED BY: Ken Levasseur

Ken, could you please be more specific about the example you tried? Can you post the code?

POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract