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
| public void run(Map<Object, Object> services) { | |
| IVonHippelModuleControl vh = (IVonHippelModuleControl) services.get(IVonHippelModuleControl.class.getName()); | |
| System.out.println("sysfstest start"); | |
| try { | |
| vh.setIOX(0); | |
| vh.setIOX(1); | |
| vh.setIOX(2); | |
| vh.setIOX(3); | |
| } catch (IOException e) { e.printStackTrace(); } | |
| 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
| import usb.core | |
| import usb.util | |
| import sys | |
| from commands import getstatusoutput | |
| import json | |
| # find our device | |
| dev = usb.core.find(idVendor=0x045b, idProduct=0x0212) | |
| # was it found? | |
| if dev is None: |
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
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://cdn.buglabs.net/swarm/swarm-v0.4.0.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| /* Open this file twice or more and you should be able | |
| to see presence in the developer console of your browser. */ | |
| function onPresence(presence) { | |
| console.log('presence -> ' + Date.now() + ':' + JSON.stringify(presence)); |
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
| /* | |
| * Sleep Pulse Firmware - firmware code for the Sleep Pulse Device. | |
| * This runs on an Atmel 328P microprocessor, at 5 volts, with a 16 MHz crystal | |
| * Within the arduino IDE, select "Arduino Pro or Pro Mini (5V, 16MHz) w/ATmega328" as the Board | |
| */ | |
| #include <math.h> | |
| #include <EEPROM.h> | |
| // Prototype pin definitions - don't change these! |
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
| Location is the same as normal, but with some extra data that isn't strictly necessary | |
| { | |
| 'feed': { | |
| 'latitude': '', | |
| 'satellites': 0, | |
| 'valid': False, | |
| 'longitude': '' | |
| }, | |
| 'name': 'Location' |
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
| api.buglabs.net | |
| community.buglabs.net | |
| communityasset0.buglabs.net | |
| communityasset1.buglabs.net | |
| communityasset2.buglabs.net | |
| communityasset3.buglabs.net | |
| cvs.buglabs.net | |
| demo.buglabs.net | |
| demo-ws.buglabs.net | |
| repository.buglabs.net |
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 <Servo.h> | |
| #include <stdint.h> | |
| #include <TouchScreen.h> | |
| #include <TFT.h> | |
| //16-bit colors, not quite HTML codes even though they look like it... It's a pain: | |
| //http://en.wikipedia.org/wiki/High_color#16-bit_high_color | |
| #define SAMSUNG_BLUE 0x1111 | |
| #define SAMSUNG_CYAN 0x0d3c | |
| #define SAMSUNG_GREY 0xbdd7 |
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
| #!/bin/sh | |
| PROJECT_NAME=$1 | |
| if [ "$PROJECT_NAME" != "" ]; then | |
| # TARGET_DIR=${PROJECT_NAME}/${PROJECT_NAME}/Debug | |
| TARGET_DIR=${PROJECT_NAME} | |
| find ${TARGET_DIR} -iname "*.d" -type f -exec sed -i 's/c:\\.*\\bin\\//g' {} \; |
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
| CC = gcc | |
| TARGET = test001 | |
| MACHINE = $(shell $(CC) -dumpmachine) | |
| # Windows | |
| ifneq (,$(or $(findstring mingw, $(MACHINE)), $(findstring cygwin, $(MACHINE)))) | |
| PLATFORM = WIN | |
| LIBS = -lm -lsetupapi | |
| RM = del |
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
| void pmc_enable_waitmode(void) | |
| { | |
| uint32_t i; | |
| /* Flash in Deep Power Down mode */ | |
| i = PMC->PMC_FSMR; | |
| i &= ~PMC_FSMR_FLPM_Msk; | |
| i |= ul_flash_in_wait_mode; | |
| PMC->PMC_FSMR = i; |