Progress Update

Got the Pattern I want

Today I first tried the very simple code which made a big polygon.

After I tried a few times, I got some pattern I like but need to make it in a loop instead of it running only after I click bottom. The final pattern looks nice which like some artwork made from some art ruler. However, for now, it is like after I click “A” button once, it will turn a little bit which gives me half of a circle and then go straight a little bit. In order to make it the entire picture, I would need to keep pushing the button. That is what I need to keep working on.

The code for fist flow shape

Also, this time got to try preliminarily a little bit about the radio function, I basically set the micro bit which as a controller to the radio set group 1, and add a command like “on button A pressed” radio send string “name” (with the name of the stirng).

input.onButtonPressed(Button.A, function () {
    radio.sendString("pinkF")
})
basic.forever(function () {
    radio.setGroup(1)

The other micro bit that been controlled, also need to be set to the radio set group 1, and need to use the on radio received string block to wrap all the other codes which are making pattern.

radio.onReceivedString(function (receivedString) {
    for (let i = 0; i < 18; i++) {
        lights.smileCycleRainbowTime(100, 3000)
        gigglebot.driveMillisec(gigglebotWhichDriveDirection.Forward, 500)
        gigglebot.turnMillisec(gigglebotWhichTurnDirection.Right, 1500)
    }
})
basic.forever(function () {
    radio.setGroup(1)
})
Video of the process for the flow shape

Trying something new

Since I got some nice pattern I like which is circling around a center, instead of keep experiencing pattern that is circling around a center. I was trying to discover some pattern that is going in a direction as a straight line, in this case, my bot will be able to run around our canvas instead of just staying at a fixed spot on our canvas.

However, since everything is measured by ms, so haven’t been able to figure out how many seconds is needed to make a turn that I want. That’s the new problem I am facing right now.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.