Line follower array not supported in scratch?


#1

Hi,
is the line follower array not supported in scratch? I’ve played around with it for a while. The LEDs on the array itself seem to indicate that it is working correctly, and quite robust with respect to different floor and line colors - the LEDs directly over the line (if any) are always off, the other ones are on (red). However the value I get from “line follower” in Scratch is always “3” whatever I try.

Thanks and regards,
Andreas


#2

Hi andreas_b,

It is suggested to use mBlock software to program our line follower module.
Here is an example program to you for reference:http://learn.makeblock.com/en/mbot-programming/


#3

The sample program at http://learn.makeblock.com/en/mbot-programming/ uses the line follower module. Is the line follower array (http://www.makeblock.com/me-line-follower-array) supported in Scratch (mBlock)?


#4

The line follower module should produce one of four values:

0 - Both Sensors are over the line
1 - Left Sensor is over the line / Right Sensor is off of the line
2 - Left Sensor is off the line / Right Sensor is over of the line
3 - Both Sensors are off of the line

I use the oval line follower [port] block to read the value for my mBots. My ebook (link) covers the basic programming of the mBot but is based on a slightly earlier version of mBlock (will be updating it sometime in December, updates are free) that you may or may not find useful.


#5

Hi,
thanks for the replies. But I suspect apart from abdb, you are all talking about the (“normal”) line follower, while I am talking about the line follower array. I would expect more than values 0-3 as output - rather something like 2^6 different values from the 6 sensors, i.e. values 0-31.
Using it from mBlock, the array always returns “3” - no matter what the status of the LEDs on the array is.
I also tried it from a Raspberry (with the pi4j library) via GPIO and the makeblock UNO shield, with no success either. Even tried the I2C variant from pi4j for analog output, and failed as well (potentially because I’m a programmer, electronics is not exactly my strength).

Does anyone have a working example for a line follower array in mBlock, or even better in Java?

Thanks and regards,
Andreas


#6

Hi Andreas_b,

Thanks for your correction. The line follower array only supports Arduino IDE programming and doesn’t support by the mBlock graphical programming.


#7

Ah, you are correct. Is that a new product because I hadn’t seen it before! Need to order a few to make more complex maze solving robots! :slight_smile:

@tec_support, does the line follower array work with all of the kits (mBot, mBot Ranger, Ultimate Robotics Kit, Starter Robot Kit)?


#8

Hi Charles,

Yes, the line follower array work with all the makeblock main board like mCore, me Orion, me Auriga…,while you need program yourself with the Arduino software, it doesn’t support the mBlock graphical programming. It supports the native Arduino programming.


#9

The sample program from the product page (http://download.makeblock.com/Modules/Me%20Line%20Follower%20Array/Sample_program.ino) works, but I had to change the DataPin to 13 when plugged into Orion port #3 (to match the Arduino data pin for port #3). There isn’t any documentation or comments in the sample program, but the array uses unibus to transmit data. The getValue() method returns an 8-bit int where the right-most 6 bits correspond to the values of the individual sensors on the array. For example, B110011 would be returned if the two middle sensors were over a black line, and the four other sensors (two on each side) were on a light background.

If anyone has a good line-follower program using the array I’d love to see it.

Also, are there any plans to create a “block” for this for mBlock?


#10

Hi,
I think like you: I’d love to see a good line-follower program using Me Line Follower Array.
In addition, it would be a very good idea to create a block in mBlock.
It is difficult for me to understand the Sample_program.ino and I would need more information.
Can anybody help me?

Regards,

Susana


How to write code to control line follower sensor modules with 5 sensors?
#11

FYI, a teacher wrote a mblock extension for the Linefollower Array.
Select Extension/Manage Extensions to find and install that extension.


#12

Any link, please?


#13

Mblock extension for line follower array not supported in scratch (mblock IDE). Its work on Mbot (arduino mode).
abdb wrote: The getValue() method returns an 8-bit int where the right-most 6 bits correspond to the values of the individual sensors on the array. For example, B110011 would be returned if the two middle sensors were over a black line, and the four other sensors (two on each side) were on a light background.
Based on this I was made simple program for mbot:


#14

Thanks!

It is fantastic!!!

Regards,

Susana


#15

Hi,

This Christmas came the line Follower Array module. I programmed it with mBot using its extension and… cool…I’m happy.
It is a pity that this module can not be used with the Ranger. Perhaps, the Makeblock house could modify the array extension of the mCore board to the Auriga board. That would be fantastic!

Regards,

Susana


#16

My son has to make a line following robot for school. He’s using the Mblock Auriga and we’ve got the Me Follower Array. We’ve got the extension for the Array, but it’s only supporting Port 1-4 while with the auriga, we have to use port 6 till 10. Haw can we do this.


#17

Hi, I can not manage to make it running in mBlock with that extension. I use mCore but all I get from follower array is 0. I have managed to make it up and running in Arduino IDE. Please help. I need to have it in mBlock if possible also. I have tried your example from the picture but something must be wrong here. Thanks. Oldrich


#18

Do you have the coding for the line follower with the array in Arduino? We always get stuck to upload it to the Ma Aguira board


#19

Here’s a link to an extension repository that has the code. You will likely have to make modifications to get it to work with the Auriga board.


#20

I think that We’ve got this extension added. If we try it in mblock, we can’t change the port to 6 till 9. If we try do do something in arduino with it. It disconnect the USB connection immediately, when we start to upload.