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 files | |
// These lines allow us to use code routines (libraries) from other files, | |
// so that we don't have to write everything by ourselves. | |
///////////////////////////////////////////////////////////////////////////// | |
#include <p18lf25k22.h> // This file includes definitions for all of the | |
// registers on our chip | |
#include <usart.h> | |
#include <math.h> |
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
// Drawbot 2.1 Firmware | |
// Inspired by the Makeitlast contest where the original example is from | |
// This version by @Addidis | |
// See www.jeselectronics.com for more info | |
///////////////////////////////////////////////////////////////////////////// | |
// Include files | |
///////////////////////////////////////////////////////////////////////////// | |
#include <p18lf26k22.h> // This file includes definitions for all of the registers on our chip | |
#include <usart.h> //see the c18 documentation for these |
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
// Shake switched led by addidis | |
// HW : Tautic accelerometer board +4.7k pull ups, uno32, led +330 resistor to led pin | |
// Accelerometer connections : SDA - A4 , SCL - A5, INT - 7, gnd - gnd, vdd - 3.3v 4.7k pull ups on SDA SCL | |
// LED connections: pin 6 to led, to 330 ohm to ground . | |
//notes - not debounced so it flickers. Really, just playing around with the features of the accelerometer. | |
#include <Wire.h> |
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
// MMA7660FC Basic demo by Addidis | |
// Released under the Creative Commons Attribution-ShareAlike License (3.0) | |
// http://creativecommons.org/licenses/by-sa/3.0/us/ | |
// 10/24/11 | |
// HW : Tautic accelerometer board +4.7k pull ups on sda scl , uno32, led +330 resistor | |
// SCL -->A5 | |
// SDA -->A4 | |
// INT -->D7 | |
// gnd -->gnd | |
// vdd -->3.3v NOTE 3.3v! |