Program in python


#1

Hi there,

I have an Orion starter kit, I’ve learnt a little about using Scratch to program it, and now I want to buy a few extra parts to make it do new things. I feel that using scratch will be difficult for things like maze solving, adding robotic arms, line follower etc and so I should look at using arduino instead?

I’d also like to learn to program with Python - can Python be used to program an orion starter bot?
Would buying an mBot board give me more options to build more complicated robots?

Any advice welcome

Daniel


#2

Hey,actually Orion board is based on Arduino Uno so you are actually using Arduino,but just with RJ25 ports.Also you don’t have to be afraid that coding a line following code is hard in Scratch,it actually is pretty simple and easy to understand on how to do it(I can give you some example code for mBot).If you are new into robotics,I’d suggest getting mBot first as it is easy to code and assemble and is a great kit to start working with robots.For the Python part,I am unsure if you can code on Arduino with Python.


#3

Actually, the limitations of the code generator in mBlock make doing things a bit more challenging than working in native Arduino code, especially if you are shooting for autonomous operations. The code generator has the following limitations that I’ve come up against:

  1. No data structures
  2. No strings

I wrote an ebook for the mBot (link) that has a maze solver in it, but it’s a pretty simple, stateless, left-hand maze following algorithm. I’m currently working on an ebook for the mBot and Arduino programming that will feature a line follower and a much more intelligent maze solver among other things.


#4

We got the starter version (orion, not mbot ) a few months ago, we assembled the “tank” and got it doing the basics, controlled with the IR remote (using scratch on the starter/ultimate(orion) board on the mblock site).
For my first attempts at doing simple commands I used “mbot program”- didn’t work - and I eventually discovered that I had to code with “orion program” using the mblock software.
I would love to see some example codes for line following, but mbot programming is not the same as orion right?
I found software that can convert python to mbot but not one that will convert to orion - this was the moment when I thought I should just buy an mbot board and make life easier for myself!


#5

thanks for your reply
I have to admit i’m pretty confused about the differences in coding mbot v orion v Arduino (well maybe not so much about Arduino - except that I cant read it or code it).
So far I’ve done some basics with the mblock starter kit which uses the orion board (basic commands with the IR remote, obstacle detection) .
when I first start I tried using the “mbot program” to code it until I discovered I had to use the “orion program” version of scratch on the mblock page.
Seems like almost all that I can find when searching for help on coding refers to the mbot rather than the orion board.
your ebook sounds great for the new owner of an mbot but how useful is it for the orion board?
[/quote]


#6

The best answer I can offer is that there are differences between what blocks are and are not available for the mBot and Orion. In essence, the Orion board has fewer blocks available and some of the blocks that are the same have different options.

mBlock is essentially Scratch, so working through a few Scratch tutorials would get you up to speed in no time.

In the book, I try to approach the sensors and movement in a fashion that should largely translate over to the Orion although the motors on the Orion have to be set separately where on the mBot there is a single block to control movement (forward/backward/turn left/turn right). If nothing else, you’d get a sense of how to program in mBlock but please don’t feel like I’m trying to push a book sale. After I get the volume I’m working on completed and published, I’ll be turning my attention to the Orion-based kits but I’m sort of hip-deep in the current swamp right now. :frowning:


#7