GithubHelp home page GithubHelp logo

tweetmachine's Introduction

TweetMachine

Read this post to understand what Tweetmachine is.

The following paragraph describes software setup.

Step by step guide

This guide assumes you're using a Debian-like distribution (e.g., Raspbian). However, it should be easily adaptable for other Linux distributions.

This guide also assumes that the current working directory is your home (~). If you're using a different directory, please adapt some of the following commands.

  • Install git

      sudo apt-get install git 
    
  • Install i2c-tools (useful, for instance, to run i2cdetect) and the I2C development library (needed by wiringPi at build time)

      sudo apt-get install i2c-tools libi2c-dev
    
  • Edit the kernel modules

      sudo nano /etc/modules
    

    Paste these lines at the end of the file

      i2c-bcm2708 
      i2c-dev
    
  • Edit /etc/modprobe.d/raspi-blacklist.conf

      sudo nano /etc/modprobe.d/raspi-blacklist.conf
    

    and comment the two following lines:

      # blacklist spi-bcm2708
      # blacklist i2c-bcm2708
    
  • Edit /boot/config.txt

      sudo nano /boot/config.tx
    

    Paste these lines at the end of the file

      dtparam=i2c1=on
      dtparam=i2c_arm=on
    
  • Reboot (kernel should now load i2c modules by default at startup)

      sudo reboot
    
  • Download wiringPi library and tweetmachine software

      git clone git://git.drogon.net/wiringPi
      git clone https://github.com/lucach/tweetmachine
    
  • Apply a custom patch to wiringPi library

      cd ~/wiringPi
      git apply ~/tweetmachine/0001-Add-wiringPiI2CWriteBlock-function.patch
    
  • Build wiringPi

      ./build
    
  • Install python2 and tweepy

      sudo apt-get install python2.7 python-pip
      sudo pip install tweepy
    
  • Build tweetmachine software

      cd ~/tweetmachine
      ./build
    
  • Inside download.py change these values with your Twitter Developers app keys:

    • CONSUMER_KEY
    • CONSUMER_SECRET
    • ACCESS_TOKEN
    • ACCESS_TOKEN_SECRET

    Be careful and double check the keys you've inserted. A single wrong character is enough to break the whole application.

  • Inside download.py change the HASHTAG you want to follow. Here you can customize other parameters (such as the number of tweets retrieved each time and the name of the output file).

  • Start download.py in background. The easiest (but not very flexible) way:

      ./download.py &
    
  • Start program (which reads a file and sends data to the Flashmat matrices)

      ./program 1 output.txt
    

tweetmachine's People

Contributors

lucach avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.