Brian Moreau

Search my site


Plasma
   Home   
    Solutions    
    Articles   
    Projects   
    Blog   
    Contact   
    Maker Portfolio   
 
 
 

Social Devices

So I have started work on my first Social device.
The idea is to have a device that can communicate with web based social networks.
This is not wearable tech but art tech that will be a centrepiece for the home or office.
We have tech in our pockets, in our ears, on our wrists and even built into our clothing so why not detach ourselves from that and have it on our walls.
It will look stylish and give the user basic but essential information.
Imagine a business with this device on the board room wall, attracting attention when a web hit is received or a sale made.
Perhaps you want to monitor tweets but you don’t want to be glued to your Twitter account on your tablet, phone or computer.
This frees up time for you to do other things but still provide potential customers with a prompt response.
Yes if you haven’t realised already more and more businesses are now available on Twitter and they are directly communicating with the public.
I guess it would also be possible to monitor server or website issues, arrival of emails and even notify you on arrival of a message form an important contact.
Could this be the beginning of the end of email as we know it?

In addition to the 100’s of business uses it has function in the home.
Yes it can notify you when you receive a Facebook notification but also connect with other home smart devices such as washing machines, fridges and your heating and lighting.

Phase #1 Connecting to Twitter
Just get a Wi-Fi Arduino Shield and connect to twitter, you know things are never that simple. The problem is Twitter requires a secure connection using OAuth, something that apparently the Arduino is unable to do directly.

The work around appears to be to use a middle man, like a proxy server, basically some remote script located on a server that receives the request from your Arduino, relays that to Twitter in the secure fashion and then returns the data to the remote script that then returns it to your Arduino.

That’s fine if you have your own server and you can program in PHP or similar else your have to use one of the Arduino Twitter Library’s and share your data with others!

There is a growing number of website providing this connection gateway for internet enabled devices or IOT’s

So I am thinking, not wanting to share of setting up my own IOT server or even better finding a way to have the Arduino communicate with Twitter directly.

The OAuth function is capable of running on a number of platforms from mobile phones to web servers so this got me thinking about the Arduino Web Server project, dose this run Apache? Can I install apache on Arduino and then the OAuth C++ Client Library?

Problem #1
Wi-Fi Shield not working
Now this is not intended to be a help forum but as this affected me and I found it hard to find a sensible solution that worked I thought I would share.

If on attempting a Wi-Fi connection you receive a ‘Wi-Fi shield not present” error most likely you are using an Arduino board less than R3 i.e. R2.
Note there are two technical descriptions of the Wi-Fi Shield, this one explains fully and in detail what you have to do to use the Wi-Fi Shield on older boards.
The IOREF pin which didn’t slot onto anything on my Arduino Uno and is unmarked on the Wi-Fi board itself must be connected to the 3.3 Volt line.
This is easily achieved with a plug in link but note the warning if you later upgrade to an R3 board.

Back to Twitter
So as it appears installing Linux or Apache on Arduino is probably impossible (wish I had a Pi) the only current option is to use a remote hosted script as middle man.
Not wanting to use the generic twitter library or have my data sent via a third party site I decided to make my own commands and own middleman.

Wait… DOWN GRADING….
Still a long way from connecting to Twitter I feel.
So another problem, having got my board connected to the Wi-Fi network I found I could not connect to a server. The following function fails.

client.connect(servername, 80);

After discovering my Wi-Fi shield despite being a recent R3 version had outdated firmware version 1.0.0
There is a message on the Arduino website on the Wi-Fi library page recommending you update the Wi-Fi firmware if you are using a programmer IDE V 1.0.5 or above.

You can get the firmware version of yoru Wi-Fi shield using the following code.
Serial.print(WiFi.firmwareVersion());

Looking at trying to achieve that under a windows platform was proving to be a mission so just before I ran off to get a Micro USB cable from Maplin Electronics and boot my Linux system I came across a thread in a help forum suggesting to down  grade the IDE to version 1.0.2 as a fix.

This fixed the problem for me but left me pondering why R3’s don’t already come with the new firmware installed.

It’s working
So I finally got two projects working, a tweet switch that simply tweets when you press a button and a tweet mention / search indicator.
Both projects are a little ropy and prone to glitches but do work.

https://s3.amazonaws.com/linksprite/camera/JPEG_camera_uartinterface_TTL/LSY201evaluationsoftware.exe

 
 
 
Social Devices New project for 2014
© 2008 - 2021 - Brian Moreau

Valid XHTML 1.0 Transitional Valid CSS!