Permalink
Browse files

Examples adapted to FranchPad

  • Loading branch information...
Rei Vilo
Rei Vilo committed Sep 24, 2012
1 parent f65dc8f commit 32b47a9faec56672d26b0554c43e379f1eee0797
@@ -8,12 +8,12 @@
void setup() {
// initialize the digital pin as an output.
// Pin 14 has an LED connected on most Arduino boards:
- pinMode(14, OUTPUT);
+ pinMode(RED_LED, OUTPUT);
}
void loop() {
- digitalWrite(14, HIGH); // set the LED on
+ digitalWrite(RED_LED, HIGH); // set the LED on
delay(1000); // wait for a second
- digitalWrite(14, LOW); // set the LED off
+ digitalWrite(RED_LED, LOW); // set the LED off
delay(1000); // wait for a second
}
@@ -16,10 +16,16 @@
// Rei VILO, Mar 14, 2012 - Average
// Rei VILO, May 21, 2012 - Updated with GREEN_LED, RED_LED and PUSH2
// Rei VILO, Sep 09, 2012 - TimerSerial.h no longer required
+// Rei VILO, Sep 24, 2012 - FraunchPad excluded
// Press push 2 to end
// Tested on msp430g2452 and msp430g2553
// 2196 bytes
+#if defined(__MSP430G2452__) || defined(__MSP430G2553__) || defined(__MSP430G2231__)
+#else
+#error Board not supported
+#endif
+
// RED_LED, GREEN_LED, TEMPSENSOR, PUSH2 already defined
#define NUMBER 4 // take number / 2
@@ -7,9 +7,8 @@
//
// Project FRAM_ACC
//
-// Created by Rei Vilo, 22/09/12 19:47
-// http://embedxcode.weebly.com
-//
+// Created by Rei Vilo, Sept 22, 2012
+// Revised by Robert, Sept 23, 2012
//
// Copyright © Rei Vilo, 2012
// Licence CC = BY NC SA
@@ -78,7 +77,8 @@ accelerometer_FR::accelerometer_FR() {
}
void accelerometer_FR::begin() {
- pinMode(ACC_ENABLE, HIGH);
+ digitalWrite(ACC_ENABLE, HIGH);
+
_x = 0;
_y = 0;
_z = 0;
@@ -16,7 +16,12 @@
// Revision
// Rei VILO, May 21, 2012 - Updated with GREEN_LED, RED_LED and PUSH2
// Rei VILO, Sep 09, 2012 - TimerSerial.h no longer required
-//
+// Rei VILO, Sep 24, 2012 - FraunchPad excluded
+#if defined(__MSP430G2452__) || defined(__MSP430G2553__) || defined(__MSP430G2231__)
+#else
+#error Board not supported
+#endif
+
#include "Wire.h"

0 comments on commit 32b47a9

Please sign in to comment.