Skip to main content

0.8

Major VersionM

by Pete Prodoehl

Introduction

Connect a Thumbstick to a Bit Board and view the output using a 7 Segment Display.

Video Overview

Featured Document

  1. We'll connect the Thumbstick with a Crazy Circuits Ribbon Cable using all four wires. Plug the three-wire connector of the Crazy Circuits Ribbon Cable into the row with Pin 0 on the Bit Board. The wire colors should match the pin header colors, with S1 (yellow) going to the yellow pin. Next, plug S2 (orange) into Pin 1. (S2 is separated from the three-wire connector to allow you to plug it into another row.)
    • We'll connect the Thumbstick with a Crazy Circuits Ribbon Cable using all four wires.

    • Plug the three-wire connector of the Crazy Circuits Ribbon Cable into the row with Pin 0 on the Bit Board. The wire colors should match the pin header colors, with S1 (yellow) going to the yellow pin.

    • Next, plug S2 (orange) into Pin 1. (S2 is separated from the three-wire connector to allow you to plug it into another row.)

    • To the Thumbstick plug - (black) into GND, + (red) into +5V; S1 (yellow) into VRx; S2 (orange) into SW.

    • We won't plug anything into VRy pin for this example.

  2. We'll connect the 7 Segment Display with a Crazy Circuits Ribbon Cable using all four wires. Start by plugging the connector with the three wires in it (Black, Red, Yellow) into the Pin 13 row of the Bit Board. (Make sure the Black wire is in - and the Yellow wire labeled S1 is closest to the number 13 on the Bit Board.) We can then plug the Orange wire labeled S2 into Pin 14 on the Bit Board.
    • We'll connect the 7 Segment Display with a Crazy Circuits Ribbon Cable using all four wires.

    • Start by plugging the connector with the three wires in it (Black, Red, Yellow) into the Pin 13 row of the Bit Board. (Make sure the Black wire is in - and the Yellow wire labeled S1 is closest to the number 13 on the Bit Board.)

    • We can then plug the Orange wire labeled S2 into Pin 14 on the Bit Board.

    • Now we'll connect the other end of the Ribbon Cable to the 7 Segment Display.

    • The pin labels are on the back of the 7 Segment Display PCB. From top to bottom it's CLK, DIO, VCC, GND.

    • CLK stands for Clock and DIO stands for Data Input/Output. VCC is the Positive (+) and GND is the Ground (-) or Negative.

    • S1 (Yellow) goes to CLK, S2 (Orange) goes to DIO, and then + (Positive) goes to VCC and - (Ground or Negative) goes to GND.

    • Make sure every wire is connected in the correct place, or our display will not work!

  3. We used some 3D printed parts we designed to hold the Thumbstick and 7 Segment Display in place on a LEGO baseplate. We attached two 2x4 LEGO Bricks to the bottom of the 3D printed holders to allow it to snap onto the LEGO Baseplate a bit easier. Alternately you can try to use some LEGO bricks and some rubber bands/tape to hold the sensors in place.
    • We used some 3D printed parts we designed to hold the Thumbstick and 7 Segment Display in place on a LEGO baseplate.

    • We attached two 2x4 LEGO Bricks to the bottom of the 3D printed holders to allow it to snap onto the LEGO Baseplate a bit easier.

    • Alternately you can try to use some LEGO bricks and some rubber bands/tape to hold the sensors in place.

    • You can always 3D print your own Thumbstick Sensor Holder and 7 Segment Display Holder if you need them.

  4. If you've never used a micro:bit before you'll want to check out this guide:  Bit Board V2 Setup and Use
    • If you've never used a micro:bit before you'll want to check out this guide: Bit Board V2 Setup and Use

    • We're going to load the following code for our Thumbstick 7 Segment Simple program: https://makecode.microbit.org/_R64gfCH1r...

    • In the on start block we'll disable the LED matrix and set Pin 1 to pull up, as we'll attach this to the button on the Thumbstick.

    • We'll also set up our 7 Segment Display by setting CLK to use Pin 13 and DIO to use Pin 14. (We assign the display to a variable named tm.)

    • In the forever loop we'll first clear the display, and then show number, with the value we get from an analog read on Pin 0.

    • Now that the display is showing a number we'll check if the button is pressed, and if so, we'll clear the display for 1 second.

    • Once the code is loaded it should start running immediately.

    • You can power the micro:bit via the USB cable you used to load the code or you can use a battery pack plugged into the Bit Board.

    • Move the Thumbstick left and right and you should see the value shown on the 7 Segment Display change.

    • Press the Thumbstick (button) down and the display will clear for 1 second.

  5. Follow along with our recorded Live Stream!
    • Follow along with our recorded Live Stream!

    • (We'll add the video to this step after we do the stream!)

Finish Line

Pete Prodoehl

Member since: 3/4/20

482 Guides authored

0 Comments

Add Comment



View Statistics:

Past 24 Hours: 0

Past 7 Days: 11

Past 30 Days: 13

All Time: 13