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
const int pwmPin = 13; | |
const int inPin = 3; | |
const int pulseLenIn = 50; | |
int pulseLen; | |
volatile boolean l; | |
void TC3_Handler() | |
{ | |
TC_GetStatus(TC1, 0); | |
digitalWrite(pwmPin, l = !l); |
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
/* | |
leo_usb2serial | |
Allows to use an Arduino Leonardo as an usb to serial converter. | |
*/ | |
void setup() { | |
Serial.begin(115200); | |
Serial1.begin(115200); | |
} |
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
# extracted from https://github.com/arduino/YunBridge | |
('a', CONNECTED_Command()) | |
('b', WRITE_TO_ALL_Command()) | |
('c', CONNECTING_Command()) | |
('d', DATASTORE_GET_Command()) | |
('f', CLOSE_Command()) | |
('g', WRITE_Command()) | |
('i', ISDIRECTORY_Command()) | |
('j', CLOSE_Command()) |
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
From d0ce7cd7f072aa6cd641a2110b2f269986875f7b Mon Sep 17 00:00:00 2001 | |
From: Martino Facchin <[email protected]> | |
Date: Fri, 20 Mar 2015 13:07:38 +0100 | |
Subject: [PATCH] Fix examples on eeprom library v2 | |
--- | |
.../EEPROM/examples/eeprom_crc/eeprom_crc.ino | 4 +- | |
.../EEPROM/examples/eeprom_get/eeprom_get.ino | 4 +- | |
.../examples/eeprom_iteration/eeprom_iteration.ino | 19 +---- | |
.../examples/eeprom_pointer/eeprom_pointer.ino | 74 ----------------- |
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
/* | |
Setup: | |
A0 <-> 3.3V | |
A9 <-> A7 | |
A9 <-> 5 | |
A3 -> floating | |
expected behavior: | |
digitalRead(A0) == 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
// watchdog sam test | |
// initialize watchdog and then hardfault | |
// and see averything restarting | |
int counter = 0; | |
int limit = 200; | |
int limit2 = 0; | |
void print2(void) { | |
Serial.println("print2"); |
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 itertools | |
import collections | |
import pprint | |
import json | |
import os | |
import dicttoxml | |
def dot_to_json(a,b): | |
output = {} | |
for index, key in enumerate(a): |
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
package main | |
import ( | |
//"flag" | |
"bytes" | |
//"crypto/rand" | |
"fmt" | |
"github.com/facchinm/go-serial" | |
"math/rand" | |
"os" |
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
#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_SAM_DUE) | |
#define SERIAL_PORT SerialUSB | |
#else | |
#define SERIAL_PORT Serial | |
#endif | |
uint8_t speedTestBuffer[256]; | |
void setup() | |
{ |
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
compiler.path=/usr/bin/ | |
# These can be overridden in platform.local.txt | |
compiler.c.extra_flags=-Wextra -flto | |
compiler.c.elf.extra_flags=-w -flto -fuse-linker-plugin | |
compiler.S.extra_flags=-flto | |
compiler.cpp.extra_flags=-Wextra -flto | |
compiler.ar.extra_flags=--plugin=/usr/lib/gcc/avr/4.9.2/liblto_plugin.so | |
compiler.objcopy.eep.extra_flags= | |
compiler.elf2hex.extra_flags= |
OlderNewer