Hi everyone,
I've been working on a project with my partner to control a servo and wave shield with an Arduino Uno R3 for use in enhancing a fursuit with noises and movement. However, I'm having some troubles with the code which I am unable to fix myself.
Basically, I had to reassign a new library for the servos as the Wave Shield didn't like the one I was currently using for them, that was no problem as someone had written code for this and I replaced it. Now though I am trying to program the Wave Shield to play various sound files on the SD card at the press of a button (well, 4 to be precise) but I get these errors:
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp: In member function 'uint8_t SoftwareServo::attach(int)':
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:27:23: error: 'digitalWrite' was not declared in this scope
digitalWrite(pin,0);
^
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:28:17: error: 'OUTPUT' was not declared in this scope
pinMode(pin,OUTPUT);
^
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:28:23: error: 'pinMode' was not declared in this scope
pinMode(pin,OUTPUT);
^
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp: In member function 'void SoftwareServo::write(int)':
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:51:51: error: 'clockCyclesPerMicrosecond' was not declared in this scope
pulse0 = (min1616LclockCyclesPerMicrosecond() + (max16-min16)(16LclockCyclesPerMicrosecond())angle/180L)/64L;
^
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp: In static member function 'static void SoftwareServo::refresh()':
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:73:30: error: 'millis' was not declared in this scope
unsigned long m = millis();
^
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:106:60: error: 'digitalWrite' was not declared in this scope
for ( i = 0; i < count; i++) digitalWrite( s->pin, 1);*
- ^*
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:108:21: error: 'TCNT0' was not declared in this scope - uint8_t start = TCNT0;*
- ^*
C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo\SoftwareServo.cpp:123:28: error: 'digitalWrite' was not declared in this scope
_ digitalWrite( s*->pin,0);_
_ ^_
Multiple libraries were found for "SoftwareServo.h"
Used: C:\Users\Nick\Documents\Arduino\libraries\SoftwareServo
Not used: C:\Users\Nick\Documents\Arduino\libraries\WaveHC
Error compiling.
Attached is the code of the "SoftwareServo.cpp", if you require a copy of the script I use for the Uno, let me know and I will post it ASAP!
Any help here please? If there is a thread that solves this problem or one like it, the link would be very much appreciated!
Many thanks for any help/advice/tips!
_SoftwareServo.cpp (3.18 KB)*_