Thanks to the recent contributions on the community, and with some help from the team members at Spark, I was able to complete a Spark Core project this weekend. It’s a twitter magnet that displays tweets on a simple/cheap 16x2 LCD screen.
The project files are up on GitHub at: https://github.com/spark/twitter-magnet
I’m more of a hardware guy, so the node.js code may not be upto the standards. But it works!
There is an LDR to measure the ambient light in the room and control the LCD backlight accordinly. I’ve also added a temperature sensor (TMP36) - just because
The hardware you put together is pretty!
Is that a photo-resistor near A0 and A1? Your firmware references it as a TMP36.
I added the TMP36 later which is connected to A0 and the LDR is connected to A1.
Great work, definitely a great looking hardware job. Are you an UI Designer as well by any chance?
May I ask, what the name of that type of cable? How can I find it?
Thanks! I just do hardware. For now.
It’s a standard, single stranded, 30 AWG wrapping wire. Cyan for obvious reasons
Thank you so much for sharing! I appreciate it, even with bonus picture! Great!
Where do we run node.js? On a separate computer on the network?
Node.js will be on any machine which supports it. Either a local machine or server hosted outside is fine
I’d like to use this to display feeds, without a constantly running ‘real’ computer (energy saving). What do you mean by ‘server hosted outside’?.
Been thinking about a Raspberry, but shouldn’t that single job be possible on the STM32?
Many thanksfor your thoughts!
Display feeds from twitter? Right now, twitter API is hard to work directly with due to the HTTPs wrapped around it.
Webhooks should be the best option to get this done up without requiring an external server for node.js.
There’s some 3rd party service to do that for you and you can google some examples
kbl, just to support what kennethlimcp was saying, HTTPS requires a lot of overhead to manage security certificates and is not feasible on the Core. So using the cloud to do that part via a 3rd party or the “coming soon” webhooks is necessary but I also believe better since it offloads processing from the Core
Thanks kennethlimpc and peekay123 - I’m looking forward to webhooks.
Although, adafruit’s printer receives tweets with just a basic arduino - at first glance, it should be possible to replace the ethernet shield with a CC3000 (breakout, not the spark core).
Maybe I need to remove that STM32 from my core
Of course, these thoughts are theoretical and don’t compare with realised projects such as twitter-magnet (well done!)
I’m trying to create a twitter app as per the instructions on the git for the project… but I don’t understand what I’m doing…
I cant even get past the first step!
Step one is to go to api.twitter.com and create a new app… so i named it “SparkTorch” and gave it a description of “Send spark torch a message” there is then a required field of website… what do i put in that box? and do i need the callback URL too?
Am i creating a web server using node and linking the twitter app to that website? is that the overall idea?
that was months ago before twitter went https-only. your best bet at the moment is to use a linux box to proxy the API and connect the core to that.