To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 27191
27190  |  27192
Subject: 
Program doesn't work
Newsgroups: 
lugnet.robotics
Date: 
Sat, 14 Jul 2007 10:43:32 GMT
Original-From: 
Amela Rakanovic <amela.rakanovic@SPAMCAKEgmail.com>
Viewed: 
4396 times
  
Does someone know why motors on RCX are not working with this code:

#include<unistd.h>
#include<conio.h>
#include<dsensor.h>
#include<dmotor.h>

int main(int argc, char **argv){
    ds_active(&SENSOR_1);
    while(1){
        if(TOUCH_1){
            dlcd_show(LCD_ARMS);
            motor_a_dir(1);
            motor_a_speed(100);
        }
        else{
            dlcd_hide(LCD_ARMS);
            motor_a_dir(0);
        }
    }
    sleep(20);
return 0;
}

Regards
Amela



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR