bluatigro Posted April 27, 2018 Posted April 27, 2018 are there here users of ev3basic here ? i m a great fan of basic [ i use it +-33y ] the only problem is that in smal basic the char's of the IDE can not be bigger i got the following working test.sb : a = Buttons.Current EV3.SetLEDColor( "ORANGE" , "PULSE" ) While a <> "U" a = Buttons.Current EV3.SetLEDColor( "GREEN" , "NORMAL" ) Program.Delay( 500 ) EV3.SetLEDColor( "RED" , "NORMAL" ) Program.Delay( 500 ) EndWhile EV3.SetLEDColor( "ORANGE" , "PULSE" ) Quote
bluatigro Posted May 3, 2018 Author Posted May 3, 2018 i tryed to create a dark line folow program [MOC] the light on the ev3brick reacts as expected but the motor''s not what can be wrong ? '' bluatigro 3 may 2018 '' dark line follow '' volg donkere lijn '' robot wil follow a dark line '' robot volgt een donkere lijn '' const's init '' constanten init colport = 1 colreflect = 0 ''readpercent colambient = 1 ''readpercent colcolor = 2 ''readrawvalue rgbraw = 4 ''readraw irport = 4 irproc = 0 ''readpercent = cm irseek = 1 ''readraw = angle , dist irremote = 2 ''readraw[ 0 ... 3 ] = channel[ 1 ... 4 ] Sensor.SetMode( colport , colreflect ) Sensor.SetMode( irport , irremote ) EV3.SetLEDColor( "ORANGE" , "PULSE" ) irkey = Sensor.ReadRaw( irport ) While irkey( 0 ) <> 3 And irkey( 0 ) <> 4 irkey = Sensor.ReadRaw( irport ) EndWhile EV3.SetLEDColor( "GREEN" , "PULSE" ) ' main lus | loop While irkey( 0 ) <> 1 And irkey( 0 ) <> 2 light = Sensor.ReadPercent( colport ) irkey = Sensor.ReadRaw( irport ) If light < 20 Then Motor.MoveSteer( "bc" , -15 , 75 , 30 , "false" ) Else Motor.MoveSteer( "bc" , 75 , -15 , 30 , "false" ) EndIf EndWhile Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.