This file contains 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
import wiringpi | |
import time | |
from subprocess import PIPE, Popen | |
def init_fan(): | |
wiringpi.pwmSetMode(0) # PWM_MODE_MS = 0 | |
wiringpi.wiringPiSetupGpio() | |
wiringpi.pinMode(18, 2) # pwm only works on GPIO port 18 |
This file contains 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
import serial | |
import re | |
nranges = 0 | |
nsuccess = 0 | |
current_range = 0 | |
last_pass = False | |
csv = open("node_otput.csv", "w") |
This file contains 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
# cflib can be installed via 'pip install cflib' | |
import cflib.drivers.crazyradio as crazyradio | |
cradio = crazyradio.Crazyradio() | |
# Connection parameter for the CF2 | |
cradio.set_data_rate(cradio.DR_2MPS) | |
cradio.set_channel(110) | |
for _ in range(10000): |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
<style> | |
body { padding: 0; margin: 0; } | |
html, body, #map { height: 100%; } | |
</style> | |
</head> |