Question: Getting the spectrometer to work with a Raspberry Pi?

anjohn12 is asking a question about spectrometry
Follow this topic

by anjohn12 | April 14, 2016 18:48 | #12978


I am currently working on creating a program that will go to the spectral workbench page, login, take a spectrum reading, and export the data. I want this to run in the background and not open a web browser. I am running this program on a Raspberry PI 2 and am using python as my programming language.

I tried using the requests module to do this, but I ran into problems. Are there any good, easy to use modules that can be used for this, or are there any modules that the spectral workbench team would recommend for this? Thanks!



6 Comments

Hi! We just released a Node.js version of the core library here: https://github.com/publiclab/spectral-workbench.js

I think it'd be possible to take the image data and use the node-canvas module to extract data from an image headlessly; and there are node.js ways to capture from a webcam too. So you could try to run the whole thing offline using just Node.js.

I have an open issue for using node-canvas -- https://github.com/publiclab/spectral-workbench.js/issues/2

I don't know if you code any JavaScript but this seems like a good point to start from. Sounds interesting!

Reply to this comment...


There's now been a lot of work on this via WebValley and @cristoforetti -- take a look at #webvalley posts, and we managed to get it working!

Reply to this comment...


@warren is there a chance to write a note about using a raspberry pi and post it as a build? I think others have had interest about this. Did we already do that and the fault is mine for not looking before I responded? lol. Forgive if so.

Is this a question? Click here to post it to the Questions page.

Yes, I think that's be great. I'm adding this as a "challenge" on the Spectrometry page, hope someone picks it up. Also see related: https://publiclab.org/notes/warren/09-28-2016/upgrade-a-diy-spectrometer-with-a-raspberry-pi-camera


We're also now collecting more info on this page: https://publiclab.org/w/raspberry-pi-spectrometer


Reply to this comment...


Also see this question on getting data off a Raspberry Pi via keyboard emulation: https://publiclab.org/questions/warren/04-29-2017/getting-a-raspberry-pi-to-output-data-by-emulating-a-keyboard

Reply to this comment...


Log in to comment