Emulator for teaching

I have only just got my Arduboy, however I can see fantastic oppertunities to use this within a classroom environment. we currently use the microbit in the classroom and the children use the emulator to test their code. is it possible to do this with the arduboy ?

1 Like

I’ve not looked at any to know how useful they are but here’s a couple of links

1 Like

Thanks the proton looks great but i think a little tricky to set up for 10/11 year olds

A further google brings this simulator
http://www.andrewlowndes.co.uk/blog/graphics/arduboyjs-_-arduboy-in-javascript

1 Like

That looks ace! much more like what i was looking for easy to set up

i have never used javascript before so i will have to investigate … is there a converter between coding languages ?

I’m pretty sure most of the ‘emulators’* are outdated or not fully functional. They’re usable but they aren’t exact analogues so I’m pretty sure the code would have to be changed slightly for the actual devices.

(*: None of the emulators are actual emulators in the technical sense because they simulate the environment and not the hardware.)

(Sidenote: I wish they’d taught us programming in primary school, I’d be a lot more advanced than I am now. The closest we got was the lame pixie ‘robot’ and a basic overview of excel formulas.)

for educators, and for children insterested it would be useful to have an emulaor like [quote=“Keyboard_Camper, post:4, topic:3631, full:true”]
A further google brings this simulator
http://www.andrewlowndes.co.uk/blog/graphics/arduboyjs-_-arduboy-in-javascript
[/quote]

except running in arduboy code so they can test it on the emulator and then if it works ok try it out on the arduboy! this would protect the hardware untill the code is in a state to be uploaded.

Children pick this up so quickly

I have not delved into written code much in the classroom - bar some hour of code python, giving me time to learn it myself, things in the last few years have really stepped up.
at the moment the coding club i set up use Microbits and the block editor which goes with it. I really like showing them how they can use coding outside the computer they are on. hence the microbit and now my interest in the arduboy - not to mention always loving the idea of coding but never having the time ( how handy work now has me learning to code !)

However at the moment i have had the arduboy since friday and just about managed to animate a little bird and get it to move left right up and down with the same animation … so i dont expect it will be till next summer i try out the arduboy with the 11yr olds (giving people time to make a great emulator for to help us get kids interested in written code and moving away from the block editors before secondary school ! :stuck_out_tongue:

(side note: we only had the grey turtle )

1 Like

We would love to have an official version of this but at the moment right now we don’t have the resources to support it. It’s something we want to offer in the future but we’re still trying to play catch up enough to offer a games library and uploader.

There is also Clouduboy, an online Arduboy IDE/game editor

Which at some point developed some kind of JS translator as well.

I also saw a tweet from @JayGarcia the other day that had him using what looked like an emulator but I didn’t hear back from him what it was.

4 Likes

Not sure how relevent it is, but from what I can tell that’s Javascript on the left using the React library.

I’d love to have a go at making an Arduboy emulator or simulator myself but there’s so much work involved to do it properly that I wouldn’t be able to do it on my own. (And I’ve got other projects I’m working on anyway.)

To do it properly you’d have to emulate the hardware, not just so people can choose to not use the libraries, but also because it would be awkward to have to simulate each (hardware-manipulating) library individually.

When I was in primary school, I’d figured out some of the formula stuff we hadn’t been taught just by playing around with it.
Also another reason I begrudge it not having been on the curriculum when I was at school. The UK is really far behind with teaching programming, it’s no surprise most programmers are self-taught.

(I really wanted to go on a massive rant about how much better I’d be if they’d been teaching programming in primary and secondary school when I was at school, but I shall keep my bitterness to myself.)

I assume that means you’ve allocated yourself a few months to learn how to program before attempting to teach the students code rather than trying to learn things a few weeks before you’re supposed to be teaching them.

Technically both the Arduboy and the Microbit are computers in their own rights, but I get what you mean.

The journey of a thousand miles begins with but a single step semicolon.

Now this is something I can get behind. I have a great dislike of block editors (mainly due to my college making us use GameMaker).


An additional note, something worth looking into as a teaching aid is Computercraft, a mod for Minecraft. It’s been used quite effectively for teaching children how to program. It is also how I learnt my 3rd language, Lua, which to this day is still probably my favourite scripting language.

Why not just updating arduboy2 library to make it compatible and able to compile with sdl2, as it seems to be the most used and official arduboy library to make games?

This is the approach I used to make my first game, ardu-whack (even if I didn’t explicitely used arduboy2 lib): it helped a lot to develop the game, to fast prototype it, and even to make release for desktop (useful when you want to share your work).
The project organization is just a little bit tricky (because of .ino file), but it is only one time do, at project creation.

:sunglasses:

This is how I would have created the simulator if I were doing it. SDL2 is a nice library.

The only problem is the sound libraries, the sim speed and the memory usage. You can cap the framerate easily, but you can’t cap how much work people do per frame, so they might write something that works fine in the simulator but when it’s moved to the Arduboy it’s doing more work per frame than the Arduboy can handle. The memory thing is an obvious problem with no obvious solution (might be able to define a PROGMEM macro that fails if too much memory is being used, but there’s no easy way of testing how much memory global variables are using or what the size of the hex would be). Sound is an awkward one. SDL2 (last time I checked) uses a user-defined callback to fill the sound space with (I think) wav-formatted data (which I think is a kind of pulse code modulation). I don’t know how the Arduboy handles sound because I’ve never touched sound, but I’m guessing it’ll be in a different format.

Long story short, however it’s done there will be flaws and caveats and it’ll be a fair bit of work.

Even a simulator that only provided the Arduboy2 API (no sound or other libraries), and didn’t handle exact timing, could be useful. You could still get the bulk of your sketch up and running and then do sound development on the actual hardware as you’re forced to do now.

This would probably be more than sufficient to meet the goals of the original post, which is to help with teaching.

The Curriculum has really stepped up now in the UK, It is fantastic for children who are so eager to create .My school has 100 children and I always have too many sign up for the club than I can take . Sometimes I am amazed at what they make on Scratch Jr, Scratch and (In my computing club, which i started this year, when given the computing subject leadership) Microbit.
I plan to role out lessons for the microbit across the school in septemeber ( having taken a test lesson with some 5-7 year olds) The microbit is given free to Yr 7 students (secondary school) However I have had great success with some of the 6/7 year olds using this device on block editor (Where Blockeditor is best suited).
I am a Reception teacher and i use scratchJR (no reading) theFoos and lego bits and bricks by the summmer term (often they start with mouse skills and paint so its a good level of development) with the children in my class and they soon learn the rules and create wonderful little programmes, I really dont think you can be too young to get involved. (Some 5/6 yearolds in the school club have created whole little games on scratchjr where they have created arrows to press to move a rocket and make things flash when the rocket touches them … really cool!. One of 6 used scratch to play a song using the key board by coding the note to the key- simple but cool at 5! ) and the younger the start on blocks the sooner they should be introduced to written code ( so far we are on 10- 11 years) .

Blocks are easy to use and easy to debug, often the older children want to go back to it as they can produce far more indepth programmes using the blocks. For that reason I am torn on block editors.

Answer to your queston : Yes I do have to take some time, get my head around the how to’s before teaching, When i feel some confidence i share this with the club where i have AMAZING parents who are very knowldgeable and we explore what i have done and the children explore up to this level. Then i have to show other staff as this had to be taught by the class teacher and then they have to feel confident before roling it out. For some things this may be relitivly simple The FOO’s and some of the hour of code Python activities took a few weeks to role out , microbits took half the year and I think that Arduboy I would have to spend a great deal more time on and see what the developments are int the emulaors before moving on to the club or thinking about lessons designed for the Junior class teachers.

It is fantastic to see so much interest in making block editors and emulators for this device, Making this more accessable to the next generation, Can you imagne the things they are going to come up with with knowledge so much younger!

It just annoys me that it’s all a decade late. My generation was seriously let down, and the country’s technological capabilities (although quite impressive) pale in comparison to what they could have been if programming had been on the curriculum back then.

I don’t doubt for a second what they’re capable of - I still remember my time in primary school well, especially how interested me and my friends were in video games and science.

Lego and programming go hand in hand - both are an expression of creativity founded upon maths (arithmetic, algorithms and geometry).

This is what I was hoping to hear. I’ve been let down in the past by teachers who were trying to teach the course material before they’d learnt it themselves, so we all ended up learning inefficient methods of doing things and only learning after the fact that there was an easier way. (It wasn’t programming, but it was technology related.)

It’s not that hard to get basic things running, the difficulty comes with making more complex things because of the complexity of the language and the lack of pre-made datastructures.

Excuse me while I go and cry in the corner for a moment ; n ;

1 Like

This is practically what Clouduboy does. :stuck_out_tongue_winking_eye:

As an added bonus, it also works currently with the Micro:bit, with a screen add-on not very different from this one.

Both of the above are experimental, but working. :slight_smile:

1 Like

Awesome !

Could I try the beta ? :stuck_out_tongue_closed_eyes:
It would be amazing to try it …see if it is something which could be used in a junior primary classroom

This looks interesting - where did you find the screen?

Hi! Unfortunately the current Beta is rather outdated and the new features (like cross-compiling) is not available on the site. Feel free to follow the twitter channel, or sign up for the news mailing list for the upcoming updated beta release which (hopefully) will contain these extra features. :wink:

In case you are interested, here is a recent talk where I describe the motivations of the project and the current state of affairs:

Junior primary level is definitely in the scope. :blush:

RE: Micro:bit, the prototype uses DigOLE OLED screens.

1 Like

My big interest in an Arduboy emulator is to avoid burning out my flash while developing.

3 Likes

It’s rated to 10k cycles which would theoretically be several years of constant re-flashes every day. But it’s actually been destructively tested to something like a million, so we should be fine.

Furthermore, I’ll throw it out there that if you do manage to run out of flash cycles, we will warranty that for the lifetime of the device. But you’ve got to prove it somehow :wink:

The work that @flaki has done on clouduboy is epic, im still trying to figure out a way to support the best or more of these projects and platforms built by other people and incorporate them into the site somehow or at least have a directory of them soon.

3 Likes