Skip to content

Instantly share code, notes, and snippets.

@toygame
toygame / DigiSpark_ATtiny85.ino
Created January 25, 2018 13:39
Arduino Library
/*
/ DigiSpark ATtiny85 Tester
/ Create by Thanapon@arduino2day
*/
void setup() {
pinMode(PB1, OUTPUT);
}
void loop() {
digitalWrite(PB1, HIGH);
@toygame
toygame / Relay 2 Channel Tested.ino
Created January 29, 2018 11:50
Test Relay 2 Channel Code
/*
Code Test Relay 2 Channel
Created by Thanapon@Arduiono2day
*/
#define IN1 3
#define IN2 4
void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
}
/*
* Code for Testing Ardiono Uno + HC-05 Bluetooth
* Created by Thanapon@Arduino2Day.com
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup() {
Serial.begin(9600);
/*
Created by Thanapon@Arduino2Day.com
*/
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxxxxx";
@toygame
toygame / TestMAX44009.ino
Last active July 25, 2019 07:35
Test Module MAX44009 Ambient Light Sensor_Arduino2Day
#include "Wire.h"
#include "Max44009.h"
Max44009 myLux(0x4A);
uint32_t lastDisplay = 0;
void setup()
{
Serial.begin(115200);
@toygame
toygame / global_conf.json
Last active June 25, 2019 07:20
LoRaWAN config for TTN Server
{
"SX127x_conf":
{
"freq": 923200000,
"spread_factor": 7,
"pin_nss": 10,
"pin_dio0": 24,
"pin_rst": 0,
"pin_led1":5
},
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
// LoRaWAN NwkSKey, network session key
// This is the default Semtech key, which is used by the early prototype TTN
// network.
static const PROGMEM u1_t NWKSKEY[16] = {}; // Insert Network Session Key of The Device
//Example static const PROGMEM u1_t NWKSKEY[16] = { 0x00, 0xD0, 0x90, 0xEF, 0x7F, 0x1A, 0x50, 0xF3, 0xA8, 0xFA, 0xED, 0x34, 0xD3, 0x46, 0xDC, 0xDF };
@toygame
toygame / global_conf.json
Created June 25, 2019 07:17
Private LoRaWAN with LoRa Server Project
{
"SX127x_conf":
{
"freq": 923200000,
"spread_factor": 7,
"pin_nss": 10,
"pin_dio0": 24,
"pin_rst": 0,
"pin_led1":5
},