RGB Line Following


#1

Would someone please take a look at my program? i just want to write a simple line following program for the mBot, using the RGB line Following Sensor but somehow it doesn’t work.
My mBot seems react very slowly about the program and i definitely sure that it’s not about the battery.
Are there something wrong in my coding? I’d love to discuss about it. Thanks!

RGB_LineFollow.sb2 (76.0 KB)


#2

Hi,
I want to try the RGBLineFollowing module but, in Spain, it is not sold. It is a pity!
Before, we could go online shopping servce, but now they stopped serving people like me, I’m not a distributor… In my opinion, Makeblock has stepped back with this decision. I am very angry!

Regards,

Susana


#3

@susanaoubina,

I feel your pain. Makeblock has stated that they are in the process of setting up their Amazon store and I think AliExpress. However, it does not appear that they have all of their products loaded there yet. A lot of people have asked them make the individual parts available and not just the kits.

I’m having to hold off on a project for the same reason which is something of a bummer.

Regards,

Chuck


#4

A couple of comments just looking at the code (can’t run it right now because I’m not near my mBots).

  1. I see an undefined block in the last iff statement and in the custom block (see below). What are those supposed to be?
  2. The custom block is not being used anywhere.
  3. You are doing several reads of the sensor. Have you considered doing a single read per loop iteration and just testing that value? That would require storing the value in a variable.

The delays may be due to the nested repeat-until loops in each if. You may want to consider using a custom block to nudge the bot for ~.25 seconds to get back on the line rather than use the nested repeat-until loops.

Just some thoughts.

Chuck


#5

Hi ipming,
Downloaded your program and got same as Chuck.
And there is guidance for RGB line follower.


#6

Thanks.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.