Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Thanks Robert! Here it's the example StateChangeDetection working! #include TimerSerial mySerial; const int buttonPin = PUSH2; const int ledPin = RED_LED; int buttonPushCounter = 0; int buttonState = 0; int lastButtonState = 0; void setup() { pinMode(buttonPin, INPUT_PULLUP); pinMode(ledPin, OUTPUT); mySerial.begin(); } void loop() { buttonState = digitalRead(buttonPin); if (buttonState != lastButtonState) { if (buttonState == LOW) { buttonPushCounter++; mySerial.println("on"); mySerial.print("number of button pushes: "); mySerial.printl
  2. Thanks! here i'll post some sketches that works: delay time set by an analog input int sensorPin = 7; int ledPin = 14; int sensorValue = 0; void setup() { pinMode(ledPin, OUTPUT); } void loop() { sensorValue = analogRead(sensorPin); digitalWrite(ledPin, HIGH); delay(sensorValue); digitalWrite(ledPin, LOW); delay(sensorValue); } If you declare PIN 7 (P1_5) as input, then, connect the wiper on PIN 15(P1_7). Maybe the pin mapping is wrong. const int sensorPin = 7; const int ledPin = 14; int sensorValue = 0; int sensorMin = 1
  3. well, it's a bit weird, but it's working :mrgreen: i haven't learnt how to count in symbols yet, but the program compiles and run #include TimerSerial mySerial; void setup() { mySerial.begin(); } void loop() { if (mySerial.available()){ mySerial.write(analogRead(7)); } delay(1000); } terminal output:
  4. Hi. I can't compile your sketch using MSP430G2231, I get the following error: C:\Users\Dani\Desktop\energia-0101E0006\hardware\msp430\libraries\TimerSerial\TimerSerial.cpp: In static member function 'static void TimerSerial::RxIsr()': C:\Users\Dani\Desktop\energia-0101E0006\hardware\msp430\libraries\TimerSerial\TimerSerial.cpp:205:16: error: 'TA0IV_TACCR1' was not declared in this scope Best Regards
  5. Hi, i've a G2211 laying around and i can confirm that it is working using it as LaunchPad w/ msp430g2231. I've tried the following sketches and all of them works OK. Blink Fade Button Debounce AnalogInput it's really weird, i've connected a pot in the pin P1_5 as i've wrote it in the code. I've just tried connecting the center tap to pin P1_7 and now it's working. The command Serial.Begin doesn't work: AnalogReadSerial.cpp.o: In function `setup': C:\Users\Dani\AppData\Local\Temp\build1421017437023774230.tmp/AnalogReadSerial.cpp:12: undefined reference to `Serial' C:
  6. Hello, I'm Daniel and i'm here to learn about MSP430 programming. Last year i bought the Launchpad Dev Board, but when i realize that there wasn't any open source IDE I felt so hopeless... Now with Energia I'm giving another chance to the Launchpad, I'm very excited with this project. Best Regards.
  • Create New...