in de avond na marnick1
Dependencies: mbed Servo MODSERIAL FXOS8700Q
Revision 0:009a005982e5, committed 2019-10-29
- Comitter:
- jasperkessels
- Date:
- Tue Oct 29 19:12:00 2019 +0000
- Commit message:
- servo_jasper_savonds;
Changed in this revision
diff -r 000000000000 -r 009a005982e5 FXOS8700Q.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FXOS8700Q.lib Tue Oct 29 19:12:00 2019 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/Freescale/code/FXOS8700Q/#aee7dea904e2
diff -r 000000000000 -r 009a005982e5 MODSERIAL.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Tue Oct 29 19:12:00 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/Sissors/code/MODSERIAL/#d2a5e26fd658
diff -r 000000000000 -r 009a005982e5 Servo.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Tue Oct 29 19:12:00 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/jdenkers/code/Servo/#352133517ccc
diff -r 000000000000 -r 009a005982e5 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 29 19:12:00 2019 +0000 @@ -0,0 +1,32 @@ +/* servo motor program - biorbotics groep 8 */ + +#include <Servo.h> +#include <mbed.h> +#include <math.h> /* cos */ +#include <MODSERIAL.h> + + +MODSERIAL pc(USBTX, USBRX); +Servo myservo(D3); + + +int main() +{ +myservo.Enable(1500,20000); + + while(true) { + pc.printf("starting"); + for (int pos = 1000; pos < 2000; pos += 25) { + myservo.SetPosition(pos); + wait_ms(20); + } + for (int pos = 2000; pos > 1000; pos -= 25) { + myservo.SetPosition(pos); + wait_ms(20); + } + } + +} + + +
diff -r 000000000000 -r 009a005982e5 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 29 19:12:00 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file