This is an old revision of the document!


#include <homelab/pin.h>
#include <homelab/module/motors.h>
 
//
// Main programm
//
int main(void)
{
    // Seadista kontroller
    Homelab_clock_init();
 
    // Seadista mootorid
    dcmotor_drive_pwm_init(1,TIMER_NO_PRESCALE);
    dcmotor_drive_pwm_init(2,TIMER_NO_PRESCALE);
 
    // Oota nupule S0 vajutust
    while(!button_read(S0));
 
    // Käivita mootorid, et robot sõidaks pidevalt otse edasi
    dcmotor_drive_pwm(1,1,0xFF);
    dcmotor_drive_pwm(2,1,0xFF);
}
temp.1449738463.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0