Hello,
I´d like to use the Pulse400 library to control multiple ESCs with more than the standard 50Hz from the Servo library.
First I tried to implement it into my sketch - didn´t work. So I tried to verify one of the example sketches but it didn´t work either.
The library should be installed correctly. I also installed the, for the Pulse400 library necessary, TimerOne library.
Library: https://github.com/tinkerspy/Pulse400
#include <Pulse400.h>
int pin[] = { 4, 5, 6, 7 };
Multi400 motors;
void setup() {
motors.begin( pin[0], pin[1], pin[2], pin[3] );
delay( 1000 );
motors.setSpeed( 200, 200, 200, 200 );
delay( 1000 );
motors.setSpeed( 0, 0, 0, 0 );
motors.end();
}
void loop() {
}
Error:
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
sketch_feb25a:5: error: no matching function for call to 'Multi400::Multi400()'
Multi400 motors;
^
C:\Users\Marcus\Documents\Arduino\sketch_feb25a\sketch_feb25a.ino:5:10: note: candidates are:
In file included from C:\Users\Marcus\Documents\Arduino\sketch_feb25a\sketch_feb25a.ino:1:0:
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:144:3: note: Multi400::Multi400(Pulse400&)
Multi400( Pulse400& pulse400 );
^
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:144:3: note: candidate expects 1 argument, 0 provided
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:141:7: note: constexpr Multi400::Multi400(const Multi400&)
class Multi400 {
^
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:141:7: note: candidate expects 1 argument, 0 provided
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:141:7: note: constexpr Multi400::Multi400(Multi400&&)
C:\Users\Marcus\Documents\Arduino\libraries\Pulse400\src/Pulse400.h:141:7: note: candidate expects 1 argument, 0 provided
C:\Users\Marcus\Documents\Arduino\sketch_feb25a\sketch_feb25a.ino: In function 'void setup()':
sketch_feb25a:10: error: 'class Multi400' has no member named 'setSpeed'
motors.setSpeed( 200, 200, 200, 200 );
^
sketch_feb25a:12: error: 'class Multi400' has no member named 'setSpeed'
motors.setSpeed( 0, 0, 0, 0 );
^
C:\Users\Marcus\Documents\Arduino\sketch_feb25a\sketch_feb25a.ino: In function 'void loop()':
sketch_feb25a:17: error: 'i' was not declared in this scope
for(i=0; i<100; i++)
^
sketch_feb25a:19: error: 'class Multi400' has no member named 'setSpeed'
motors.setSpeed(10,10,20,0);
^
exit status 1
no matching function for call to 'Multi400::Multi400()'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.