Luuc
Published © LGPL

Kleines Graues

Aus dem Pink Roboter wurde eine kleine Maus, angetrieben von zwei Servos, gesteuert vom Calliope Mini.

IntermediateFull instructions provided8 hours92

Things used in this project

Hardware components

Sperrholz 3mm
×1
Calliope mini
Calliope mini
×1
FEETECH FS90R Micro Continuous Rotation Servo
×2
Stoffreste
×1
Heissleim
×1
Kugel 15mm
×1
4xAA battery holder
4xAA battery holder
×1

Story

Read more

Custom parts and enclosures

graueMaus

Code

graueMaus

JavaScript
let Index = 0
input.onButtonPressed(Button.A, () => {
    pins.servoWritePin(AnalogPin.P1, 90)
    pins.servoWritePin(AnalogPin.P2, 90)
})
basic.showString("S")
for (let Index = 0; Index <= 4; Index++) {
    pins.servoWritePin(AnalogPin.P1, 90 + Index * 10)
    pins.servoWritePin(AnalogPin.P2, 90 - Index * 10)
    basic.pause(1000)
    basic.setLedColor(Index * 60)
}
pins.servoWritePin(AnalogPin.P1, 180)
basic.pause(100)
for (let Index = 0; Index <= 9; Index++) {
    pins.servoWritePin(AnalogPin.P2, 180 - Index * 10)
    basic.pause(200)
}
basic.setLedColor(Colors.Yellow)
pins.servoWritePin(AnalogPin.P1, 90)
pins.servoWritePin(AnalogPin.P2, 90)
basic.showIcon(IconNames.Heart)

Credits

Luuc
8 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.