Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Recommended Posts

Posted

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" )
 
	

Posted

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
	

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...