Thorsten Kimmeskamp
Published © GPL3+

Calliope mini-Handpuppe

Verwandle deinen Calliope mini in eine elektronische Handpuppe!

AdvancedFull instructions provided4 hours346
Calliope mini-Handpuppe

Things used in this project

Hardware components

Calliope mini
Calliope mini
×1
Seeed Studio Grove Thumb Joystick
×1
MoPei SG90 Servo
×2
Battery Holder, 3 x AAA
Battery Holder, 3 x AAA
×1
Batterie AAA
×3
Messleitungs-Set mit Krokodilklemmen
×1

Story

Read more

Code

Steuerung Handpuppe

JavaScript
let x = 0
let y = 0
let x_alt = 0
let y_alt = 0
basic.forever(() => {
    x = pins.map(
        pins.analogReadPin(AnalogPin.C16),
        780,
        245,
        0,
        180
    )
    y = pins.map(
        pins.analogReadPin(AnalogPin.C17),
        780,
        245,
        0,
        180
    )
    if (x != x_alt) {
        pins.servoWritePin(AnalogPin.P1, x)
    }
    if (y != y_alt) {
        pins.servoWritePin(AnalogPin.P2, y)
    }
    x_alt = x
    y_alt = y
    basic.pause(17)
}) 

Credits

Thorsten Kimmeskamp

Thorsten Kimmeskamp

19 projects • 12 followers

Comments