Skip to content

Instantly share code, notes, and snippets.

View mamdouhmostafa's full-sized avatar

Mamdouh Ramzy mamdouhmostafa

View GitHub Profile
#include <Wire.h> //Include the Wire.h library so we can communicate with the gyro.
#include <EEPROM.h> //Include the EEPROM.h library so we can store information onto the EEPROM
//Declaring global variables
byte last_channel_1, last_channel_2, last_channel_3, last_channel_4;
byte eeprom_data[36], start, data;
boolean new_function_request,first_angle;
volatile int receiver_input_channel_1, receiver_input_channel_2, receiver_input_channel_3, receiver_input_channel_4;
#include <Wire.h> //Include the Wire.h library so we can communicate with the gyro
#include <EEPROM.h> //Include the EEPROM.h library so we can store information onto the EEPROM
//Declaring Global Variables
byte last_channel_1, last_channel_2, last_channel_3, last_channel_4;
byte lowByte, highByte, type, gyro_address, error, clockspeed_ok;
byte channel_1_assign, channel_2_assign, channel_3_assign, channel_4_assign;
byte roll_axis, pitch_axis, yaw_axis;
@mamdouhmostafa
mamdouhmostafa / Sensors.ino
Last active April 30, 2017 21:03
this code for DHT22(temperature and humidity)sensor and Gaz sensor
//Libraries
#include <DHT.h>
//Constants
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino
@mamdouhmostafa
mamdouhmostafa / Code
Created April 30, 2017 20:53
this code for sensors DHT22 (temperature and humidity) and for gaz sensor
//Libraries
#include <DHT.h>
//Constants
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino