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
int rPin = 13; | |
int gndPin = 12; | |
int gPin = 11; | |
int bPin = 10; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); |
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
{ | |
"extensionName": "WeatherCast", | |
"extensionPort": 12345, | |
"blockSpecs": [ | |
[" ", "connect %m.sensors sensor to %m.digitalpin", "connect"], | |
[" ", "connect %m.analogsensors analog sensor to %m.analogpin", "connect"], | |
[" ", "connect %m.leds led to %m.digitalpin", "connect"], | |
[" ", "connect %m.actuators to %m.digitalpin", "connect"], | |
[" ", "Turn %m.leds led %m.onoff", "turn"], | |
[" ", "Buzzer %m.onoff", "buzzer"], |
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 | |
# This is a simple port-forward / proxy, written using only the default python | |
# library. If you want to make a suggestion or fix something you can contact-me | |
# at voorloop_at_gmail.com | |
# Distributed over IDC(I Don't Care) license | |
import socket | |
import select | |
import time | |
import sys |
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 <Bridge.h> | |
#include <BridgeServer.h> | |
#include <BridgeClient.h> | |
// Listen to the default port 5555, the Yún webserver | |
// will forward there all the HTTP requests you send | |
boolean rooms[14]; | |
BridgeServer server; |
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
class Bird { | |
int frameCounter = 0; | |
int currentAnimation = 0; | |
float posX, posY; | |
PImage[][] animations; | |
int lastFrame = millis(); | |
int fps = 12; | |
Bird(float posX, float posY, String baseFilename, int numberOfAnimations, int numberOfFrames) { | |
animations = new PImage[numberOfAnimations][numberOfFrames]; |
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 <Bridge.h> | |
#include <HttpClient.h> | |
int lightValue; | |
int photoResistorPin = A0; //analog input 0 | |
void setup() { | |
// Bridge takes about two seconds to start up | |
// it can be helpful to use the on-board LED | |
// as an indicator for when it has initialized | |
pinMode(13, OUTPUT); |
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 javax.jmdns.*; | |
import java.util.Map; | |
import java.net.InetAddress; | |
import java.util.Locale; | |
import android.net.wifi.WifiManager.MulticastLock; | |
import android.net.wifi.WifiManager; | |
import android.net.wifi.WifiInfo; | |
import android.app.Fragment; | |
import android.content.Context; | |
import java.net.UnknownHostException; |
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 javax.jmdns.*; | |
import java.util.*; | |
import java.net.*; | |
JmDNS jmdns; | |
static String message = ""; | |
void setup() { | |
size(640, 480); | |
InetAddress ipAddress = getLocalIpAddress(); |
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
Element player, enemy; | |
void setup() { | |
fullScreen(); | |
player = new Element("animal.gif", 50, 50); | |
enemy = new Element("animal.gif", 40, 40, -175, -309); | |
stroke(#ff00ff); | |
} |