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
import cwiid | |
import time | |
wm = cwiid.Wiimote() | |
wm.rpt_mode = cwiid.RPT_BTN | cwiid.RPT_ACC | |
buttons = { | |
cwiid.BTN_1: 'button 1', | |
cwiid.BTN_2: 'button 2', |
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
from serial import Serial | |
from random import randint | |
import time | |
conn = Serial('/dev/rfcomm0', 57600) | |
def get_value(n): | |
return int(n / 2) | |
def set(index, r, g, b): |
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
#include <Adafruit_NeoPixel.h> | |
#define NEOPIXEL_LEN 10 | |
#define NEOPIXEL_PIN 13 | |
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NEOPIXEL_LEN, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800); | |
void setup () | |
{ | |
Serial.begin(57600); |
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
/* | |
* NeoPixel on Photon | |
*/ | |
#include "neopixel/neopixel.h" | |
SYSTEM_MODE(AUTOMATIC); | |
#define PIXEL_PIN D2 | |
#define PIXEL_COUNT 10 |
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
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson | |
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library | |
#include <Adafruit_NeoPixel.h> | |
// Which pin on the Arduino is connected to the NeoPixels? | |
// On a Trinket or Gemma we suggest changing this to 1 | |
#define PIN 11 | |
// How many NeoPixels are attached to the Arduino? | |
#define NUMPIXELS 3 |
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
/** | |
DHTServer - ESP8266 Webserver with a DHT sensor as an input | |
*/ | |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecure.h> | |
#include <ESP8266WebServer.h> | |
#include "WiFiManager.h" |
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
# -*- coding: utf-8 -*- | |
import time | |
import Tkinter as tk | |
from serial import Serial | |
from minirobots import Turtle | |
try: | |
serial = Serial('/dev/rfcomm0', 57600) | |
time.sleep(1) |
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/python | |
# -*- coding: utf-8 -*- | |
import time | |
import Tkinter as tk | |
from serial import Serial | |
from minirobots import Turtle | |
from flask import Flask, request, render_template | |
try: |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Minirobots</title> | |
<style type="text/css"> | |
td { text-align: center; } | |
button { font-size: 3em; margin: 1em; padding: 1em; } | |
table { width: 100%; } | |
</style> | |
</head> |