Skip to content

Instantly share code, notes, and snippets.

View Unique-Decoration-Lamp-First-Test.ino
#include <SPI.h>
//*************************************************ARDUINO PIN USAGE***********************************************//
#define latch_pin 2
#define blank_pin 4
#define data_pin 11
#define clock_pin 13
//*************************************************COLORWHEEL VARIABLES***********************************************//
@tuenhidiy
tuenhidiy / Arduigames
Created Apr 29, 2018
Arduigames use Arduino Uno, LoLShield, MPU6050 & Microphone Module to play some simple games & animations
View Arduigames
#include "Charliplexing.h" //LOL library
#include "Myfont.h"
#include "Figure.h"
#include "Font.h"
#include "Arduino.h"
#include "fix_fft.h"
#include "LOLDraw.h"
#include "LoLShield_Tetris.h"
#include <Wire.h>//gyro
View WIRELESS LAMP CONTROL
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
const char* ssid = "FPT-Telecom";
const char* password = "tuenhidiy";
ESP8266WebServer server(80);
View INTERACTIVE LAMP PROGRAM
#include <Wire.h>
// MPU6050 Slave Device Address
const uint8_t MPU6050SlaveAddress = 0x68;
// Select SDA and SCL pins for I2C communication - Pin default in WIRE LIBRARY: SCL - D1 & SDA - D2 on NODEMCU
// const uint8_t SCL = D1;
// const uint8_t SDA = D2;
const int R = 14;
@tuenhidiy
tuenhidiy / NodeMCU_CONTROL_SIEMENS_PLC
Created Jan 28, 2018
NodeMCU control PLC through Wifi network
View NodeMCU_CONTROL_SIEMENS_PLC
/*----------------------------------------------------------------------
Thank to Davide Nardella
----------------------------------------------------------------------*/
// Wifi -> #define S7WIFI
// Cable -> #define S7WIRED
#define S7WIFI
#include <SPI.h>
@tuenhidiy
tuenhidiy / RGB_Led_Cube_8x8x8
Created Jan 6, 2018
Main program for RGB LED CUBE 8x8x8
View RGB_Led_Cube_8x8x8
#include <SPI.h>
#define latch_pin 4
#define blank_pin 5
#define data_pin 51
#define clock_pin 52
#define layer1 26
#define layer2 27
#define layer3 28
@tuenhidiy
tuenhidiy / bitmap.h
Created Jan 3, 2018
This Hex code show GIF picture.
View bitmap.h
#include <avr/pgmspace.h>
/*-----------------------------------------------------------------------------------------------
TIGER ANIMATION
-----------------------------------------------------------------------------------------------*/
static const uint8_t TIGER00[]PROGMEM = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
@tuenhidiy
tuenhidiy / BAM_32x32_BICOLOR_MATRIX
Last active Jan 3, 2018
Main program for 32x32 Bicolor Led Matrix using B.A.M - 4 bit method
View BAM_32x32_BICOLOR_MATRIX
//************************************************************************************************************//
//********************* THE 32x32 BICOLOR RG LED MATRIX USING BIT ANGLE MODULATION METHOD ********************//
//************************************************************************************************************//
#include <SPI.h>
#include "bitmap.h"
#define blank_pin 3 // Defines actual BIT of PortD for blank - is Arduino UNO pin 3, MEGA pin 5
#define latch_pin 2 // Defines actual BIT of PortD for latch - is Arduino UNO pin 2, MEGA pin 4
@tuenhidiy
tuenhidiy / Two_Wheel_Self_Balance_Robot
Last active Jul 18, 2018
This is main program for 2 wheel self balancing robot.
View Two_Wheel_Self_Balance_Robot
/*******************************************************************************************
* Two Wheel Self Balancing Robot
*
* REVISION
* ________________________________________________________________________________________
*
* It is referred from many sources.
* - I2Cdev library: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/I2Cdev
* - MPU6050 library: http://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050
View Interactive RGB Led Table All
//************************************************************************************************************//
// The 8x8 Interactive RGB LED Table
//************************************************************************************************************//
#include <SPI.h>// SPI Library used to clock data out to the shift registers
#define latch_pin 4// Defines actual BIT of PortD for latch - is Arduino UNO pin 2, MEGA pin 4
#define blank_pin 5// Defines actual BIT of PortD for blank - is Arduino UNO pin 3, MEGA pin 5