Skip to content

Instantly share code, notes, and snippets.

#include <ESP8266WiFi.h>
const char* ssid = "your-ssid";
const char* password = "your-pass";
const char* host = "your-dns";
int mNextTime =30000;
const byte mLED_pin =16;
<?php
//------------------------------------
// @calling
// @purpose : Zero Str, max=10 char
// @date
// @argment
// @return
//------------------------------------
function getZeroStr( $src, $num ){
if($num > 10){
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
const char* ssid = "";
const char* password = "";
const char* host = "aaa1234.com";
#include "mbed.h"
#include <stdio.h>
#include <string>
#include <SerialBase.h>
string MC_ID="4";
string mRestKey="";
Serial mPc(USBTX, USBRX);
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
const char* ssid = "";
const char* password = "";
const char* host = "ans1234.com";
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
const char* ssid = "your-ssid";
const char* password = "your-pass";
const char* host = "your-dns";
@kuc-arc-f
kuc-arc-f / enc28j60_01.ino
Created October 5, 2015 03:23
enc28j60-arduino-sample-01
#include <EtherCard.h>
// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x32 };
byte Ethernet::buffer[700];
static uint32_t timer;
const char website[] PROGMEM = "dns1234.com";
@kuc-arc-f
kuc-arc-f / aTtiny85_test_1.ino
Created October 7, 2015 03:40
ATtiny85-sample: SoftwareSerial ,read Sensor
#include <SoftwareSerial.h>
int SENSOR_1= 1;
SoftwareSerial mySerial(3, 4); // RX, TX
void setup() {
mySerial.begin(9600);
pinMode(SENSOR_1 ,INPUT);
}
@kuc-arc-f
kuc-arc-f / attiny85_to_esp8266_at.ino
Created October 7, 2015 09:51
ATtiny85 send to esp8266, AT command data (Serial)
/*
attiny85_to_esp8266_at.ino
ATtiny85 send to esp8266(AT), SoftwareSerial data
[ Arduino SDK 1.0.5 ]
PIN : D3=RX, D4=TX, A1=Analog Input
AT+CIPSEND : Input required, HTTP data Length (manual count)
*/
#include <SoftwareSerial.h>
int mNextTime=30;
@kuc-arc-f
kuc-arc-f / mqtt_arduino_1.ino
Created October 9, 2015 01:47
MQTT sample : arduino-Ethrnet send to MQTT Broker
#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>
// Update these with values suitable for your network.
byte mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xE1 };
IPAddress ip(172, 168, 1, 41 );
const char* mqtt_server = "test.mosquitto.org";