Answer the question
In order to leave comments, you need to log in
Msp430 - How to work with Serial when Servo.h is connected?
I call for your help.
I'm trying to control a servo by reading data from Serial: inByte = Serial.read();
I connect Servo.h
Immediately when compiling, it gets out:
core.a(TimerSerial.cpp.o): In function `TimerSerial__TxIsr':
C:\Users\Paul\Documents\Energia\hardware\msp430\cores\msp430/TimerSerial.cpp:202: multiple definition of `__isr_9'
Servo\ Servo.cpp.o:C:\Users\Paul\Documents\Energia\hardware\msp430\libraries\Servo/Servo.cpp:87: first defined here
collect2: ld returned 1 exit status
#include <Servo.h>
void setup()
{
// start serial port at 9600 bps:
Serial.begin(9600);
}
void loop()
{
// if we get a valid byte, read analog ins:
if (Serial.available() > 0) {
// get incoming byte:
inByte = Serial.read();
if(inByte == 'w'){
// Do something
}
Serial.write(inByte); //Write what we get
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question