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
#ifndef __LED_DEBUG | |
#define __LED_DEBUG | |
#if LED_DEBUG | |
#ifndef LED_DEBUG_PIN | |
#define LED_DEBUG_PIN LED_BUILTIN | |
#endif | |
#ifndef LED_DEBUG_DELAY |
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
#ifndef __SERIAL_DEBUG | |
#define __SERIAL_DEBUG | |
#if SERIAL_DEBUG | |
#ifndef SERIAL_DEBUG_SEPARATOR | |
#define SERIAL_DEBUG_SEPARATOR " | " | |
#endif | |
#define DEBUG_0() Serial.println("### SerialDebug ###") |
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
#include <VoltageReference.h> | |
VoltageReference vRef; | |
void setup() { | |
Serial.begin(9600); | |
while (!Serial); | |
Serial.println("Calibrating voltage reference"); | |
vRef.begin(); | |
} |
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
public class WaitingWebDriver { | |
private SharedWebDriver browser; | |
private Class<? extends WebDriver> driver; | |
@Before | |
public void before() { | |
driver = ChromeDriver.class; | |
System.setProperty(SharedWebDriver.SELENIUM_DRIVER_PROPERTY, driver.getName()); |
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
#define LED_PIN 13 | |
#define BTN_PIN 2 | |
int volatile prog = 0; | |
void btnPress() { | |
// cycle over the available programs | |
// it can be done in a much compact and simpler way, but I believe this is the most | |
// simple and clear way to describe it | |
// some sort of debouncing would be required, but I don't add it here for sake of simplicity | |
if (prog == 0) { |
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
angular.module("ui-utils.focus", ['ng']) | |
.directive('focusMe', function($log) { | |
return { | |
link: function(scope, element, attrs) { | |
scope.$watch(attrs.focusMe, function(value) { | |
if(value === true) { | |
$log.debug("value=" + element[0].value); | |
element[0].focus(); | |
scope[attrs.focusMe] = false; | |
} |
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
#include <avr/io.h> | |
#include <avr/wdt.h> | |
#define RESET() wdt_enable(WDTO_30MS); while(1) {} |
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
// Time Aware Plotter | |
// License: Creative Commons BY-SA | |
// This program takes ASCII-encoded strings from the serial port at 9600 baud and graphs them. | |
// It expects up to 6 comma separated values in the range 0 to 1023 followed by a newline. | |
// Plotting must be started with a mouse click and can be paused with a mouse click as well. | |
// Please note: while plotting is stopped serial data is discarded! | |
import processing.serial.*; |
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
#ifndef Binary_h | |
#define Binary_h | |
#define B0 0 | |
#define B00 0 | |
#define B000 0 | |
#define B0000 0 | |
#define B00000 0 | |
#define B000000 0 | |
#define B0000000 0 |
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
#!/bin/bash | |
LOG_FILE=$1 | |
while : | |
do | |
temp=`/opt/vc/bin/vcgencmd measure_temp` | |
temp=${temp:5:16} | |
echo $(date '+%F %H:%M:%S') [$temp] >>LOG_FILE | |
sleep 10 | |
done |
OlderNewer