Discuss Scratch

abee
Scratcher
1000+ posts

littleBits meets Scratch

littleBits released littleBits Arduino module last month.
This module is compatible with Arduino Leonardo and all of littleBits modules.
So I wrote a sketch to emulate it as PicoBoard and WeDo.
http://squeakland.jp/abee/tmp/NanoBoardAGWithMotors.zip
If you want to use it as PicoBoard, just upload the sketch by Arduino IDE, “littleBitsAsScratchSensorBoard.ino” to your Arduino module. It works with Scratch 1.4 and 2.0 online.

The value of input port “d0” is reflected in “button” of Scratch.
The value of input port “a1” is reflected in “slider”.
The value of input port “a0” is reflected in “sound” and “resister C”(no scale correction).

If you want to use it as WeDo, you need to use “NanoBoardAGWithMotors.image” instead of standard “Scratch image”.

The output port “d9” is for “motor A”.
The output port “d5” is for “motor B”.
When the rotate direction of “motor A” is “this way”, the output port “d1” is HIGH.

You can find other pins mapping in the sketch file.

Enjoy!

Kazuhiro Abe

Last edited by abee (June 7, 2014 14:50:00)

sdmeijer
Scratcher
100+ posts

littleBits meets Scratch

Does it also support the tilt sensor and the distance sensor of Lego WeDo?
abee
Scratcher
1000+ posts

littleBits meets Scratch

The specification of the tilt and the distance sensor of WeDo is proprietary, not open source hardware. However there are many tilt and distance sensor for Arduino. It is possible to make mod for them.
abee
Scratcher
1000+ posts

littleBits meets Scratch

I shared some demo videos.

Pong on Scratch 2.0 controlled by littleBits
https://www.youtube.com/watch?v=XWZ0OK3X3EE
Twinkle, twinkle, littleBits by Scratch
https://www.youtube.com/watch?v=TNc3P2QamJU
zorori
New Scratcher
2 posts

littleBits meets Scratch

That looks great Abe-san.

I did not get very far when I tried to do it myself. I will try again, note the errors and ask better questions later. :

I have also started playing with ArduBlock with the littlebits Arduino module.

early days yet but exciting. I'm actually the father of user, Zorori who is six years old and keen to mix up Scratch and LittleBits together.

anyway, thanks for your work on this. I will see if I can get it working at home.

Rodney
abee
Scratcher
1000+ posts

littleBits meets Scratch

Hi, zorori,

Thank you for your interest to my project.
Please feel free to ask any questions.

Cheers,
Kazuhiro Abe
alin-littlebits
New Scratcher
1 post

littleBits meets Scratch

Hey,

Abee this is really great. We've been working on a very full-featured Scratch extension for Scratch 2.0. While doing that we put together a modification of the Scratch for Arduino Project (S4A: http://s4a.cat/). It uses a specially modified version of Scratch 1.4. We modified their code so that you can use it with the littleBits Arduino Module directly (you don't have to emulate anything else).Stay tuned for our Scratch 2.0 extension, but in the meantime try out our “Alpha” work, and if you have any questions about it, just ask us for help on the littleBits Arduino forum.

https://github.com/littlebits/lbScratch/blob/master/Scratch-14/binaries/LB_S4A.dmg.zip?raw=true

Oh yeah, and it seems Kreg Hanning has decided to host a Google Hangout about Scratch 2.0. We'd love to see you there:
https://plus.google.com/events/cvdco11d41r4k62dhge4r35kbak
TheAnimationShow
Scratcher
14 posts

littleBits meets Scratch

Why do people do this im not mean. I am mostly nice
learnegy
Scratcher
100+ posts

littleBits meets Scratch

@alin-littlebits: I just received the litteBits Arduino bundle and have been looking forward to testing it out with Scratch 2. I heard some mentions of an official Scratch extension for littleBits and it's great to hear that work is under way. Scratch is a natural fit for programming littleBits–the Arduino IDE is a bit intimidating for some.

I've been following and ordering littleBits since 2012 and the progress and innovation at your company is amazing. Keep up the amazing work!
infinety12321
Scratcher
67 posts

littleBits meets Scratch

abee wrote:

littleBits released littleBits Arduino module last month.
This module is compatible with Arduino Leonardo and all of littleBits modules.
So I wrote a sketch to emulate it as PicoBoard and WeDo.
http://squeakland.jp/abee/tmp/NanoBoardAGWithMotors.zip
If you want to use it as PicoBoard, just upload the sketch by Arduino IDE, “littleBitsAsScratchSensorBoard.ino” to your Arduino module. It works with Scratch 1.4 and 2.0 online.

The value of input port “d0” is reflected in “button” of Scratch.
The value of input port “a1” is reflected in “slider”.
The value of input port “a0” is reflected in “sound” and “resister C”(no scale correction).

If you want to use it as WeDo, you need to use “NanoBoardAGWithMotors.image” instead of standard “Scratch image”.

The output port “d9” is for “motor A”.
The output port “d5” is for “motor B”.
When the rotate direction of “motor A” is “this way”, the output port “d1” is HIGH.

You can find other pins mapping in the sketch file.

Enjoy!

Kazuhiro Abe
Hey, abee! i saw you project on the little bits website! it is amazing!
Sollybunny
Scratcher
16 posts

littleBits meets Scratch

i'm making a little bits maker it works

Powered by DjangoBB