Skip to content

Instantly share code, notes, and snippets.

prasertsakd

Block or report user

Report or block prasertsakd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prasertsakd
prasertsakd / udp_server.ino
Last active Aug 29, 2015
esp8266 + arduino code fix ip
View udp_server.ino
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
const char* ssid = "------------";
const char* password = "---------------";
IPAddress local_ip = {192,168,1,200};
IPAddress gateway = {192,168,1,1};
@prasertsakd
prasertsakd / udp_smart_plug.ino
Created Apr 21, 2015
Simple UDP Server for Smart Plug
View udp_smart_plug.ino
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
const char* ssid = "----------";
const char* password = "--------------";
IPAddress local_ip = {192,168,1,200};
IPAddress gateway = {192,168,1,1};
View webserver_ap.ino
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char* ssid = "...............";
const char* password = "...............";
ESP8266WebServer server(80);
View speed_led_running.ino
int ledPin;
int timeDelay;
int ledup = {6,7,8,9,10,11,12,13,12,11,10,9,8,7,6};
void setup() {
for (ledPin = 0;ledPin<=8;ledPin++) {
pinMode( ledup[ledPin], OUTPUT);
}
}
View led_count_up_down.ino
int ledPin = 13;
boolean btn_up,btn_down;
void setup() {
// put your setup code here, to run once:
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
for (int pin=6; pin<=13;pin++) {
pinMode(pin, OUTPUT);
View test_code_basic_io_shiled.ino
byte seven_seg_digits[11][7] = { { 1,1,1,1,1,1,0 }, // = 0
{ 0,1,1,0,0,0,0 }, // = 1
{ 1,1,0,1,1,0,1 }, // = 2
{ 1,1,1,1,0,0,1 }, // = 3
{ 0,1,1,0,0,1,1 }, // = 4
{ 1,0,1,1,0,1,1 }, // = 5
{ 1,0,1,1,1,1,1 }, // = 6
{ 1,1,1,0,0,0,0 }, // = 7
{ 1,1,1,1,1,1,1 }, // = 8
{ 1,1,1,1,0,1,1 }, // = 9
View udp_smart_plug.ino
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <Adafruit_NeoPixel.h>
WiFiUDP Udp;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(5, 5, NEO_GRB + NEO_KHZ800);
const char* ssid = "...............";
const char* password = "........................";
View processing_udp_button.pde
/**
* ControlP5 Button
* this example shows how to create buttons with controlP5.
*
* find a list of public methods available for the Button Controller
* at the bottom of this sketch's source code
*
* by Andreas Schlegel, 2012
* www.sojamo.de/libraries/controlp5
*
View midi_test.ino
//midi test
void setup() {
// Initialise Serial connection
Serial.begin(115200);
//midi
//nodemcu use pin D4 for TX
Serial1.begin(31250);
View udp_test.ino
#include <ESP8266WiFi.h>
#include <WiFiUDP.h>
WiFiUDP UDP;
const char* ssid = "sensorNode";
const char* password = "1234567890";
boolean wifiConnected = false;
You can’t perform that action at this time.