Projekte
nibo
NIBO2 - C Tutorial K9
main.c
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
NIBO2 - C...torial K9
main.c
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7433 private projects
378 public projects
16180353 lines compiled
58212 builds
NIBO
@
c_tutorial_9/main.c [read only]
#include <nibo/niboconfig.h> #include <nibo/display.h> #include <nibo/gfx.h> #include <nibo/copro.h> #include <nibo/delay.h> #include <nibo/iodefs.h> #include <nibo/bot.h> #include <avr/interrupt.h> #include <nibo/spi.h> #include <stdio.h> int main() { sei(); bot_init(); spi_init(); display_init(); gfx_init(); gfx_move(62, 0); gfx_set_proportional(1); gfx_print_text("motion"); gfx_set_proportional(0); gfx_move(5, 0); gfx_print_char('R'); gfx_move(118, 0); gfx_print_char('L'); delay(50); copro_ir_startMeasure(); copro_setSpeedParameters(5, 6, 7); int counter=0; while (1==1) { delay(10); char text[20]=""; bot_update(); float volt = 0.0166 * bot_supply - 1.19; sprintf(text, "%3.1fV", (double)volt); gfx_move(25, 0); gfx_print_text(text); switch(++counter) { case 200: copro_setSpeed(20, 20); break; case 400: copro_stop(); break; case 600: copro_setSpeed(-20, -20); break; case 800: copro_stop(); counter=0; break; } } return 0; }
Compiler results:
Werbung
Online
Antonioyzc
BobbiSaush
Marinaenf
Rob98
sherryldemko116903
steffensaiz4228781
warrenhinder6456
yoylavonne8337121977