Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:c855dee2c6d4
- Parent:
- 0:70a6fd5751a6
- Child:
- 2:f0215a034e04
--- a/main.cpp Mon Sep 28 09:55:41 2015 +0000
+++ b/main.cpp Mon Sep 28 12:33:24 2015 +0000
@@ -15,11 +15,12 @@
Ticker tellen;
-bool stoppen = false;
+volatile bool stoppen = false;
void GOTO()
{
-double resolution = 8400 / (2 * 3.14592);
+ double Offset = 10511 ;//8400 counts is aangegeven op de motor ( is te weinig) 10511 schiet iets over
+double resolution = Offset / (2 * 3.14159265);
double Rotation = 4; // rotation in pi
double movement = Rotation * resolution;
@@ -47,6 +48,7 @@
int main()
+
{
int proberen = 1000;
pc.printf("The number of rotation is %i \n",proberen);
@@ -54,9 +56,9 @@
-
+ while(stoppen == false){
tellen.attach(&GOTO, 0.1);
-
+ }