Smart CreativityWizard OfCircuit
Created June 25, 2020 © CC BY

Make a walking robot at home/ Circuitplayground/ #Sc

Hello friends, in this tutorial we will see to how to make a diy walking robot at home using circuitplaygroundexpress.

BeginnerFull instructions provided1 hour1
Make a walking robot at home/ Circuitplayground/ #Sc

Things used in this project

Hardware components

SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Circuit Playground Express
Adafruit Circuit Playground Express
×1
Jumper wires (generic)
Jumper wires (generic)
×1
ESD Tape, Antistatic
ESD Tape, Antistatic
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Code

robot code

Scratch
upload this code..
 input.buttonA.onEvent(ButtonEvent.Click, function () {
    for (let i = 0; i < 4; i++) {
        pins.A1.servoWrite(90)
        pins.A2.servoWrite(90)
        pause(200)
        pins.A1.servoWrite(95)
        pins.A2.servoWrite(95)
        pause(200)
        pins.A1.servoWrite(100)
        pins.A2.servoWrite(100)
        pause(200)
        pins.A1.servoWrite(105)
        pins.A2.servoWrite(105)
        pause(200)
        pins.A1.servoWrite(110)
        pins.A2.servoWrite(110)
        pause(200)
        pins.A1.servoWrite(115)
        pins.A2.servoWrite(115)
        pause(200)
        pins.A1.servoWrite(120)
        pins.A2.servoWrite(120)
        pause(200)
        pins.A1.servoWrite(125)
        pins.A2.servoWrite(125)
        pause(200)
        pins.A1.servoWrite(130)
        pins.A2.servoWrite(130)
        pause(200)
    }
})
input.onLoudSound(function () {
    for (let i = 0; i < 4; i++) {
        pins.A1.servoWrite(20)
        pause(500)
        pins.A1.servoWrite(160)
        pause(500)
        pins.A2.servoWrite(160)
        pause(500)
        pins.A2.servoWrite(20)
        pause(500)
    }
})
forever(function () {

})
forever(function () {
    light.showAnimation(light.rainbowAnimation, 2000)
    pause(2000)
    light.showAnimation(light.colorWipeAnimation, 2000)
    pause(2000)
})

Credits

Smart Creativity

Smart Creativity

14 projects β€’ 4 followers
A creative student....πŸ§’πŸ§’πŸ§‘
Wizard OfCircuit

Wizard OfCircuit

7 projects β€’ 1 follower
My name is Deepak Kumar.I am a software and hardware designer.I am also working in microcontrollers like microbit, circuit playground etc.
Thanks to Deepak- smartcreativity.

Comments