Arthur Lorencini Bergamaschi
Published © Apache-2.0

Photweet - Reading your Tweets on OLED Display using Photon

If you are bored and there's nothing else to do during the lockdown period, this project is really a easy way to spend time and learn skills

BeginnerWork in progress1 hour9
Photweet - Reading your Tweets on OLED Display using Photon

Things used in this project

Hardware components

Particle Photon
Adafruit ssd oled spi display 7 pins ssd1306
It comes inside the "Maker kit" by Particle
Jumper wires (generic)
Jumper wires (generic)
Breadboard (generic)
Breadboard (generic)

Software apps and online services

Twitter service
IFTTT Twitter service
Link your services
Particle Build Web IDE
Particle Build Web IDE
Build and flash code on browser.
particle ifttt


Read more


wiring schematic


Use kicad 5, please.

project library


Photon's code.

You can flash it online ( or build it local by using Particles workbench and VSCode (
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_SSD1306.h>

NOTE: This code example requires the Adafruit_SSD1306 library to be included,
so make sure to add it via the Libraries tab in the left sidebar.

// use hardware SPI
#define OLED_DC     D3
#define OLED_CS     D4
#define OLED_RESET  D5
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
int  x, minX; // variables for scrolling code
String newMessage = "bom dia, twitter", oldMessage;

void setup()   {
  Particle.variable("message", newMessage);
  Particle.function("input", inputMessage);
  display.setTextSize(4);       // text size
  display.setTextColor(WHITE); // text color
  display.setTextWrap(false); // turn off text wrapping so we can do scrolling
  x    = display.width(); // set scrolling frame to display width
  minX = -1500; // 630 = 6 pixels/character * text size 7 * 15 characters * 2x slower

void loop() {

  // this code displays the next bus times on the OLED screen with fancy scrolling
  display.setCursor(x/2, 7);
  if(--x < minX) x = display.width()*2;

int inputMessage(String message){
    newMessage = message;


Arthur Lorencini Bergamaschi

Arthur Lorencini Bergamaschi

2 projects • 1 follower
"If you live each day as if it was your last, some day you'll most certainly be right."


Add projectSign up / Login