Intel Edison is a very small computer that features a Dual Core Atom @ 500MHz that runs Linux and its perfect for playing along with NodeJS and GPIOs!
In this project we will do a Twitter "Mood" Reader, that basically reads a twitter feed for a certain #hashtag and says if the last message was happy, angry or about love.
- Alfredo Erdmann - https://github.com/erdmanncross
- Cris Lima - https://github.com/magmath - https://www.instructables.com/member/Cristiane+Santos/
- Daniela Santana
- Lucas Teske - https://github.com/racerxdl
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Will Need
So for this project you will need:
- Intel Edison Arduino Board
- Groove Starter Kit
And I will assume that you already played with an Edison board and know how to put nodejs scripts inside and also have Wireless Network Configured. For more details about how to configure Wireless in edison please see the Intel Edison Manual.
Step 2: Assembling All Together
Pretty simple huh? Just attach the Groove Starter Kit Shield at Edison Arduino Board, and put the LCD in a I2C port in the shield.
After everything plugged in, you can connect the USB Cables
Step 3: Creating a Twitter APP
The first thing is to go to https://apps.twitter.com logged in with your Twitter Account to create an Application.
You can name your application as you want! Be creative :D
After creating your applicatio, you will be redirected to your Application Configuration Main Page.
Step 4: Generate a Access Token
Now the next step is to generate a Access Token! So to do that click in Keys and Access Tokens at top of your Application Configuration Page and click at Create my Access Token.
After that you should come back to a page with both Consumer (Key/Secret) and Access Token (Key/Secret). Keep this page open because we will need it later!
Step 5: Download the Project
You can download the project at https://github.com/racerxdl/stuffmood - if you want it simple, just click in Download ZIP in right size of the page :D
Before putting the data inside edison, we need to make some adjustments at config.js
Step 6: Configuring Stuff Mood
So open config.js in your prefered text editor.
Remember that page I asked to keep it open? We're gonna use it now. Just replace:
- YOUR_CONSUMER_KEY with your consumer key
- YOUR_CONSUMER_SECRET with your consumer secret
- YOUR_ACCESS_TOKEN_KEY with your Access Token Key
- YOUR_ACCESS_TOKEN_SECRET with your Access Token Key
Additionally, you can change the language inClassifierLanguage. But keep noticed that the test documents for english is not very big, so it may lead to mistakes. If you wish to add more words see the end of this tutorial.
Also you can change the Tracking tags in TrackTags configure. By default it will look to #IntelMaker and #TeskeMaker tags.
Step 7: Running the Code
So let's test it! Send all files to your edison and use PuTTY to SSH.
First you need to install the nodejs script dependencies. To do so, just go to the folder you put the stuffmood project and run:
This should install all needed dependencies. After that, you can run our code!
Step 8: Testing
So that is it! There is also a few tips you can do to improve:
- Add more documents to the file classifier-words.js (maybe even other language!) and see how it works! If you can improve our documents, please send a Pull-request at our github!
- Try to add more "moods" to our document list. You can do that by adding a new mood to classifier-words.js like the existing ones.
- Have much fun!