Go Down

Topic: Using both VirtualWire and Servo.h (Read 598 times) previous topic - next topic

htycm

I am using virtualwire.h, and finally got it working.
Then I want to use the signal to control a brushless dc motor, (which with a ESC, is similar to a servo).
But as I import <servo.h>, it seems like two libraries are conflicting with each other.
Can I somehow edit the <servo.h>?
Then I tried <SoftwareServo.h>, and there will always be a compiling error...
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In member function 'uint8_t SoftwareServo::attach(int)':
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:27: error: 'digitalWrite' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:28: error: 'OUTPUT' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:28: error: 'pinMode' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In member function 'void SoftwareServo::write(int)':
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:51: error: 'clockCyclesPerMicrosecond' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp: In static member function 'static void SoftwareServo::refresh()':
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:73: error: 'millis' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:106: error: 'digitalWrite' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:108: error: 'TCNT0' was not declared in this scope
/Users/htycm/Documents/Arduino/libraries/SoftwareServo/SoftwareServo.cpp:123: error: 'digitalWrite' was not declared in this scope

What can I do? Can someone help?

Thank you very much

zoomkat

Quote
What can I do? Can someone help?


Start below:

http://arduino.cc/forum/index.php/topic,97455.0.html
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

htycm

Hi,
Thank you for give me a notice on this..
I really want to learn about this, but got a little frustrated by a lack of knowledge.
I wish to try something out, but have basically no idea of what to try.
My ultimate goal is to use Arduino to control ESC; however, my code, which includes VirtualWire, would not work with Servo.h...
I wonder how I can work with this, and if possible, I even wish to control it without the library, but how can I implement that?

Thank you very much

Go Up