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
mogrify -format png *.jp2 |
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
void blink(int pin, int times, int delayMicros) | |
{ | |
for (int ii = 0; ii < times; ii++) | |
{ | |
digitalWrite(pin, HIGH); | |
delay(delayMicros); | |
digitalWrite(pin, LOW); | |
delay(delayMicros); | |
} |
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
http://minordiscoveries.wordpress.com/2013/03/30/backing-up-raspberry-pi-sd-card-on-mac-os-x/ | |
create compressed backup | |
sudo dd if=/dev/rdisk1 bs=1m | gzip > /path/to/backup.gz | |
restore compressed backup | |
diskutil list | |
gzip -dc /path/to/backup.gz | sudo dd of=/dev/rdisk1 bs=1m | |
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 <SoftPWMServo.h> | |
const int moveButtonPin = 0; | |
const int scanSwitchPin = 2; | |
int pos = 1000; // variable to store the servo position, in microseconds | |
// For Fubarino SD | |
#if defined(_BOARD_FUBARINO_SD_) | |
#define M1EN12 7 |
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
//************************************************************************ | |
// pic32_cdcacm.c | |
// | |
// this file implements a CDC/ACM transport on top of the usb driver module. | |
// | |
// This file originated from the cpustick.com skeleton project from | |
// http://www.cpustick.com/downloads.htm and was originally written | |
// by Rich Testardi; please preserve this reference and share bug | |
// fixes with rich@testardi.com. | |
//************************************************************************ |
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
/* | |
Fubarino Test Serial | |
This works for SD and Mini. | |
Wait for start char 's' then go into echo mode: | |
What ever is typed is passed from one interface to the other | |
until the result is printed in terminal. | |
*/ | |
char cc; | |
char cc0; |
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
rx | | |
tx | | |
wake_sw | | |
wake_hw | | |
cmd_mldp //command vs data? | | |
//optional |
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
# convert the iamge | |
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso | |
# find the usb flash drive | |
diskutil list | |
# unmount the drive | |
diskutil unmountDisk /dev/diskN | |
# write the image | |
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m | |
# eject and remount drive | |
diskutil eject /dev/diskN |
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
sox sine.wav --bits 16 -r 11025 --encoding signed-integer sine.raw | |
play -r 11025 -b 16 -e signed-integer sine.raw | |
#Then use wav2c to encode the sine.raw file. Then change the variable to match | |
#https://github.com/olleolleolle/wav2c | |
~/apps/wav2c/wav2c sine.wav sine.h soundata | |
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 DIR1 = 4; //orange | |
const int PWM1 = 7; | |
const int DIR2 = 8; //brown | |
const int PWM2 = 9; //white | |
void setup() { | |
pinMode(DIR1, OUTPUT); | |
pinMode(PWM1, OUTPUT); |
OlderNewer