mirror of
https://github.com/modelec/servo_moteurs.git
synced 2026-03-18 21:40:31 +01:00
remove test
This commit is contained in:
@@ -12,10 +12,5 @@ add_executable(servo_motor
|
|||||||
MyTCPClient.h
|
MyTCPClient.h
|
||||||
main.cpp)
|
main.cpp)
|
||||||
|
|
||||||
add_executable(test
|
|
||||||
test.main.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(servo_motor TCPSocket)
|
target_link_libraries(servo_motor TCPSocket)
|
||||||
target_link_libraries(servo_motor ${PiPCA9685_LIBRARY})
|
target_link_libraries(servo_motor ${PiPCA9685_LIBRARY})
|
||||||
target_link_libraries(test ${PiPCA9685_LIBRARY})
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#include <unistd.h>
|
|
||||||
#include <PiPCA9685/PCA9685.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
|
|
||||||
PiPCA9685::PCA9685 pca{};
|
|
||||||
|
|
||||||
pca.set_pwm_freq(50.0);
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
pca.set_pwm(0, 0, 370);
|
|
||||||
usleep(1'000'000);
|
|
||||||
pca.set_pwm(1, 0, 415);
|
|
||||||
usleep(1'000'000);
|
|
||||||
pca.set_pwm(1, 0, 460);
|
|
||||||
usleep(1'000'000);
|
|
||||||
pca.set_pwm(0, 0, 415);
|
|
||||||
usleep(1'000'000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user