MIRTO Bots
What is MIRTO?
MIRTO (the MIddlesex Robotic plaTfOrm, also known as Myrtle) is an Arduino+Raspberry Pi platform currently used for teaching in the first year of the Computer Science degree at Middlesex University. It is developed as an open-source platform and the design and source code are available online.

MIRTO bot at Middlesex
A base layer incorporates Infra-Red sensors, bump sensors and a pair of HUB-ee wheels.In the center, an Arduino Uno collects the data from the sensors and is connected to the wheels to drive them. The top layer for Computer Science students is a Raspberry Pi that is connected to the Arduino Uno board by means on a serial connection on the GPIO pins.
Computer Science students will work mainly at the Raspberry Pi level, possibly extending the core platform with additional features (USB cameras, a fourth layer on top, etc.). More importantly, the platform offers a number of opportunities for teaching core Computer Science notions: from product of finite state machines to concurrency and synchronisation when reading the encoders, from networking at all levels (IP, TCP, applications) to data structures, functional programming, etc.
Projects and Code
Although I didn't track all projects, the MIRTO did make quite a few appearances in my first year of university.
Project I: Follow The Path
We started off planning, as a group, how we would approach testing the robot. We initially went with the worksheet as a guide and start-up for the direction to go.
Initially, we wanted to see if it would move, so we recreated the program we saw on the scratch worksheet and tried to see if the robot would react, which it did, once we connected to it. We also made the Hello World text show up on our LCD screens.
We started off with a basic ‘U’ track on the table, with a piece of tape. Our code explains that “If the mid sensor (1) is greater than 500 (used as a constant value, chosen by trying to keep the robot on the tape), then the robot should move forward, else it should stop.”

Follow the part - U track
An issue that we encountered is that the robot increased in speed when it got to the turning point and then fell off the table. We initially assumed that the issue was the sensors, however we found out that using 200/100 was too fast and so the robot would drop from the table. We then changed it to 100/50 which meant the robot would drift across the table without falling down.
We finally came to this conclusion through trials with different functions and variables. We did try it out, but we were not so successful in making it work. Initially, it did work and we added on parts for it, and it did diverge from the track a bit.
Project II: MIRTO Orchestra
Sequence diagrams: connecting to MIRTO bots
First phase included selecting the music and then converting musical notes into its corresponding frequency in Hz.
We had to use ASIP (library created by MDX) function called playTone which has a signature of playTone : (Hz , ms) -> (sound). We also had to convert the time of musical notes into milliseconds.
Facing a problem of synchronization, we tried multiple ways of running the files of the different voices; we tried the Putty version on which we would try to run both at the same time.
Then we found Putty Connection Manager which made that task easy for us. Even after that we still had synchronization problems. Eventually, we realized we would have to connect the robots to a network. We have done that by creating a file with a TCP listener which connected to an IP and would receive an Input and then reply with the Output. The input: Frequency in Hz and the Time in Milliseconds.
And now we had to create a conductor to send the instructions to the multiple robots.
We created a function that would send those values and by some miracle, it all worked.
Having the problem of synchronization solved we only had to put together all the functions containing the music in the conductor file.
Finally, we created a video demonstrating our work and also a Website on which you can play the music and also read step-by-step our work.


.png)
.png)

0 comments:
Post a Comment