Skip to content

Instantly share code, notes, and snippets.

View michalgce's full-sized avatar
🎯
CodeBuster

Michał Witkowski michalgce

🎯
CodeBuster
  • CodeBuster CEO
  • Gliwice
View GitHub Profile
@michalgce
michalgce / gist:329526bb18c663b3ecd93af229c05f89
Last active October 5, 2017 19:59
[ARDUINO] My stairs driver
#include "FastLED.h"
#define PIN 6
#define LEDS_PER_STAIR 15
#define STAIRS_NUMBER 16
#define NUM_LEDS LEDS_PER_STAIR * STAIRS_NUMBER
#define LIGHT_SENSOR_ANALOG_PIN 4
#define LIGHT_LEVLE_LIMIT 50
CRGB leds[NUM_LEDS];
@michalgce
michalgce / sns
Created May 9, 2015 20:57
Arduino: GPS, magnetometr, gyro, accelerometr
#include <Wire.h>
#include <HMC5883L.h>
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#include "I2Cdev.h"
#include "MPU6050.h"
// POCZATEK DEKLARACJI HMC5883L ----------------------------------
HMC5883L compass;
// KONIEC DEKLARACJI HMC5883L ----------------------------------
boolean gpsStatus[] = {false, false, false, false, false, false, false};
unsigned long start;
HardwareSerial gpsSerial(Serial1);
void setup()
{
gpsSerial.begin(9600);
// START OUR SERIAL DEBUG PORT
//
@michalgce
michalgce / bmp085.pde
Created May 6, 2015 17:25
Read barometer value BMP085
#include <Wire.h>
#include <stdint.h>
#define BMP085_ADDRESS 0x77 // I2C address of BMP085
const unsigned char OSS = 0; // Oversampling Setting
// Calibration values
int16 ac1;
int16 ac2;