Pages: [1]   Go Down
Author Topic: Using both VirtualWire and Servo.h  (Read 417 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8922
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What can I do? Can someone help?

Start below:

http://arduino.cc/forum/index.php/topic,97455.0.html
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: