Skip to content

Instantly share code, notes, and snippets.

View dicamarques14's full-sized avatar

Dg dicamarques14

View GitHub Profile
@dicamarques14
dicamarques14 / Twitch_Notifier_ESP8266.ino
Last active January 26, 2016 15:10
Blink When a Twitch channel goes live for ESP8266 with arduino IDE
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <Arduino.h>
const char* ssid = "*******"; // insert your SSID
const char* password = "*****"; // insert your password
const char* host = "smth.smth.com"; //Server where the PHP is, you'll need to find a way to host the PHP, because the ESP doesnt support HTTPs
const int httpPort = 80; // Server Port, most servers use 80
const int pinLed = 2; // led pin for telling when updating
@dicamarques14
dicamarques14 / RGB_Keyboard.pde
Created January 24, 2016 12:58
Processing code to use with arduino to control RGB LED
//Developed by Rajarshi Roy
import java.awt.Robot; //java library that lets us take screenshots
import java.awt.AWTException;
import java.awt.event.InputEvent;
import java.awt.image.BufferedImage;
import java.awt.Rectangle;
import java.awt.Dimension;
import processing.serial.*; //library for serial communication
@dicamarques14
dicamarques14 / RGB_Keyboard.ino
Created January 24, 2016 12:55
Control RGB LED with arduino over serial
// Output
int redPin = 9; // Red LED, connected to digital pin 9
int greenPin = 10; // Green LED, connected to digital pin 10
int bluePin = 11; // Blue LED, connected to digital pin 11
long int inByte;
int wait = 10; //10ms
void setup()
/*ESP UPVOTE NOTIFY, BASED ON
* http://www.kendricktabi.com/2015/08/esp8266-and-nokia-5110-lcd.html
* and http://arduinomeetslinux.com/beyond.php?p=3
* ---Dicamarques
* includes a BMP of an upvote, 48*48, couldnt make it work
* https://www.reddit.com/r/arduino/comments/41ly7p/for_every_upvote_this_thread_gets_my_arduino_will/
*
*/
#include <ESP8266WiFi.h>
/*
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager
Based on Basic MQTT example with Authentication
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient
- connects to an MQTT server, providing userdescr and password
- publishes config to the topic "/IoTmanager/config/deviceID/"
- subscribes to the topic "/IoTmanager/hello" ("hello" messages from mobile device)
Tested with Arduino IDE 1.6.6 + ESP8266 Community Edition v 2.0.0-stable and PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient
ESP8266 Community Edition v 2.0.0-stable have some HTTPS issues. Push notification temporary disabled.