This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DHT11_PIN 2 | |
void setup() { | |
pinMode(DHT11_PIN, INPUT_PULLUP); | |
Serial.begin(115200, SERIAL_8E1); | |
} | |
void loop() { | |
if (Serial.available() > 0) { | |
byte in = Serial.read(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import smbus | |
import time | |
class Accel(): | |
def __init__(self, dev=1, g=2): | |
self.bus = smbus.SMBus(dev) | |
self.set_range(g) |
NewerOlder