Energia: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[File:Energia-MSP430.png|200px|thumb|right|Energia IDE]] |
[[File:Energia-MSP430.png|200px|thumb|right|Energia IDE]] |
||
Energia is a fork of Arduino’s Processing IDE for TI’s [[MSP430]] microcontrollers. |
Energia is a fork of Arduino’s Processing IDE for TI’s [[MSP430]] microcontrollers. |
||
Energia supports: |
|||
==Examples== |
|||
[[File:Msp430analogread.jpg|200px|thumb|right|Analog Read (A0)]] |
|||
<pre> |
|||
const int analogInPin = A0; // Launchpad P1.0 Analog input pin that the potentiometer is attached to |
|||
int sensorValue = 0; // value read from the pot |
|||
void setup() { |
|||
// initialize serial communications at 9600 bps: |
|||
Serial.begin(9600); |
|||
} |
|||
void loop() { |
|||
// read the analog in value: |
|||
sensorValue = analogRead(analogInPin); |
|||
// print the results to the serial monitor: |
|||
Serial.print("sensor = " ); |
|||
Serial.print(sensorValue); |
|||
Serial.println(); |
|||
// wait 10 milliseconds before the next loop |
|||
// for the analog-to-digital converter to settle |
|||
// after the last reading: |
|||
delay(10); |
|||
} |
|||
</pre> |
|||
==Supported Boards== |
|||
* [[TI' MSP430 Launchpad|LaunchPad with msp430g2231]], |
* [[TI' MSP430 Launchpad|LaunchPad with msp430g2231]], |
||
* [[TI' MSP430 Launchpad|LaunchPad with msp430g2452]], |
* [[TI' MSP430 Launchpad|LaunchPad with msp430g2452]], |
||
| Line 10: | Line 43: | ||
==Pin mapping== |
|||
https://github.com/energia/Energia/wiki/Hardware#wiki-LaunchPad_MSP430G2452 |
|||
==Links== |
|||
* https://github.com/energia/Energia/wiki |
* https://github.com/energia/Energia/wiki |
||
* Forum http://forum.43oh.com/forum/28-energia/ |
* Forum http://forum.43oh.com/forum/28-energia/ |
||
Revision as of 09:25, 26 February 2013
Energia is a fork of Arduino’s Processing IDE for TI’s MSP430 microcontrollers.
Examples
const int analogInPin = A0; // Launchpad P1.0 Analog input pin that the potentiometer is attached to
int sensorValue = 0; // value read from the pot
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// print the results to the serial monitor:
Serial.print("sensor = " );
Serial.print(sensorValue);
Serial.println();
// wait 10 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(10);
}
Supported Boards
- LaunchPad with msp430g2231,
- LaunchPad with msp430g2452,
- LaunchPad with msp430g2553,
- FraunchPad with msp430fr5739
- Stellaris Launchpad.
Pin mapping
https://github.com/energia/Energia/wiki/Hardware#wiki-LaunchPad_MSP430G2452