![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
2018 revision to classic DataBus AVC code.
Dependencies: LSM303DLM Servo SerialGraphicLCD L3G4200D IncrementalEncoder SimpleShell
Diff: main.cpp
- Revision:
- 14:1dd83e626153
- Parent:
- 13:5566df1250f1
- Child:
- 15:35c40765f7c3
diff -r 5566df1250f1 -r 1dd83e626153 main.cpp --- a/main.cpp Wed Dec 12 17:38:02 2018 +0000 +++ b/main.cpp Wed Dec 12 18:21:57 2018 +0000 @@ -41,6 +41,13 @@ printf("Gyro: %d, %d, %d - dt: %f\n", g[0], g[1], g[2], dt); } +void read_enc() +{ + Updater *u = Updater::instance(); + + printf("Encoder: %d\n", u->encoder()); +} + void reset() { NVIC_SystemReset(); @@ -84,6 +91,7 @@ printf("Starting shell...\n"); sh.attach(test, "test"); sh.attach(read_gyro, "gyro"); + sh.attach(read_enc, "enc"); sh.attach(reset, "reset"); thread.start(callback(&sh, &SimpleShell::run));