Skip to content

Instantly share code, notes, and snippets.

View sudar's full-sized avatar

Sudar Muthu sudar

View GitHub Profile
$ make
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED] CURRENT_OS = MAC
- [USER] ARDUINO_DIR = /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java
- [AUTODETECTED] ARDUINO_VERSION = 105
- [AUTODETECTED] ARDUINO_PREFERENCES_PATH = /Users/sudarm/Library/Arduino/preferences.txt
- [AUTODETECTED] ARDUINO_SKETCHBOOK = /Users/sudarm/Dropbox/code/arduino-sketches (from arduino preferences file)
- [BUNDLED] AVR_TOOLS_DIR = /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr (in Arduino distribution)
- [COMPUTED] ARDUINO_LIB_PATH = /Users/sudarm/Applications/Arduino.app/Contents/Resources/Java/libraries (from ARDUINO_DIR)
@sudar
sudar / folder-structure.txt
Created July 7, 2013 11:36
Folder structure, to create extra cores for Arduino
sketch-book-folder/
sketch-book-folder/hardware/
/boards.txt
/variants
/variants/mega16
/variants/mega16/pins_arduino.h
@sudar
sudar / command.sh
Last active December 19, 2015 08:19
Awk command to sum up all values of a column in a text file. Explanation at http://sudarmuthu.com/blog/sum-up-all-values-of-a-column-in-a-text-file
awk '{s+=$3} END {print s}' input.txt
@sudar
sudar / pl.trace
Last active December 18, 2015 18:09
strace of python and perl script. https://github.com/sudar/Arduino-Makefile/issues/30
20:03:03.773942 execve("./reset.pl", ["./reset.pl", "/dev/ttyACM0"], [/* 47 vars */]) = 0 <0.000233>
20:03:03.775023 brk(0) = 0x95b3000 <0.000035>
20:03:03.775158 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000017>
20:03:03.775270 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7773000 <0.000014>
20:03:03.775352 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) <0.000015>
20:03:03.775444 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 <0.000016>
20:03:03.775517 fstat64(3, {st_mode=S_IFREG|0644, st_size=131344, ...}) = 0 <0.000017>
20:03:03.775645 mmap2(NULL, 131344, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7752000 <0.000015>
20:03:03.775705 close(3) = 0 <0.000012>
20:03:03.775769 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) <0.000014>
[gist id = "{GIST_ID}" file = "{GIST_FILE}"]
@sudar
sudar / 1
Last active December 18, 2015 16:49
[gist id = '1168166' file = '1']
@sudar
sudar / speed-control.ino
Last active December 18, 2015 12:19
Change the direction and speed of a DC motor using Arduino. Details at http://hardwarefun.com/tutorials/controlling-speed-of-dc-motors-using-arduino
#define E1 10 // Enable Pin for motor 1
#define E2 11 // Enable Pin for motor 2
#define I1 8 // Control pin 1 for motor 1
#define I2 9 // Control pin 2 for motor 1
#define I3 12 // Control pin 1 for motor 2
#define I4 13 // Control pin 2 for motor 2
void setup() {
@sudar
sudar / l293d.ino
Created June 7, 2013 14:51
Sample sketch to control DC Motors using L293D IC. http://hardwarefun.com/tutorials/building-robots-using-arduino
#define E1 10 // Enable Pin for motor 1
#define E2 11 // Enable Pin for motor 2
#define I1 8 // Control pin 1 for motor 1
#define I2 9 // Control pin 2 for motor 1
#define I3 12 // Control pin 1 for motor 2
#define I4 13 // Control pin 2 for motor 2
void setup() {
@sudar
sudar / test-motor.pde
Created May 31, 2013 16:21
Arduino sketch to test a DC Motro
void setup () {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
void loop () {
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
delay(5000);
@sudar
sudar / gist:5326346
Created April 6, 2013 14:49
Stellaris launchpad in Ubuntu
https://launchpad.net/gcc-arm-embedded
http://kernelhacks.blogspot.in/2012/11/the-complete-tutorial-for-stellaris.html
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi