sheen.bot logo

Pinout and wiring

Which pin is behind each port, and — the part that is printed nowhere — what the board is already using it for. Pick a board, then a port.

Read this before you write a pin number

Six pin numbers destroy this board

Pins 6 to 11 are how the chip reaches the memory its own program is stored in. Ask for one of them and the chip can no longer read its own code: no error, no message, nothing printed — the board simply restarts for ever until someone rescues it over a cable. This has happened here, to a real board, from one line.

  • Writing Pin(6) looks like port P6. Port P6 is really pin 16.
  • Writing Pin(7) looks like port P7. Port P7 is really pin 17.
  • Writing Pin(8) looks like port P8. Port P8 is really pin 26.
  • Writing Pin(9) looks like port P9. Port P9 is really pin 25.
  • Writing Pin(10) looks like port P10. Port P10 is really pin 36.
  • Writing Pin(11) looks like port P11. Port P11 is really pin 2.

The coding canvas refuses to send a program that does this. Anything you type at the board yourself has no such guard.

Some pins can only be read

Three ports can measure something but can never switch anything on. A light plugged into one of them will simply never light up, and nothing will report an error.

Measuring voltage stops working when Wi-Fi is on

The chip has two measuring units and the radio takes one of them. Only the ports listed under “reads a changing voltage” use the unit the radio leaves alone, which is why the block editor offers those and no others.

One connector runs the screen

The screen, the gesture sensor, the colour sensor, the 7-segment display and the card reader all share one pair of pins. Use that connector for something of your own and every one of them stops.

The ports

The label is what is printed beside the connector. The pin number is what your program asks for — and the two are not the same number.

19 of 19 ports
  • P033
    machine.Pin(33)
    Reads a changing voltageShares its connector with P1

    Already using it

    • Motor M1src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
    • The second serial connector, P1/P0src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_ports_uart.js
    • The voice-recognition module, P1/P0src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_voice_recognition.js
  • P132
    machine.Pin(32)
    Reads a changing voltageShares its connector with P0

    Already using it

    • Motor M1src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
    • The second serial connector, P1/P0src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_ports_uart.js
    • The voice-recognition module, P1/P0src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_voice_recognition.js
  • P235
    machine.Pin(35)
    Can only be read, never switched onReads a changing voltage

    Already using it

    Nothing — this one is free
  • P334
    machine.Pin(34)
    Can only be read, never switched onReads a changing voltage

    Already using it

    Nothing — this one is free
  • P44
    machine.Pin(4)
    Reads a voltage, but not while Wi-Fi is onThis is touch pad T

    Already using it

    • Touch pad Tsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
  • P50
    machine.Pin(0)
    Reads a voltage, but not while Wi-Fi is on

    Already using it

    • Button Asrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_buttons.js
  • P616
    machine.Pin(16)

    Already using it

    Nothing — this one is free
  • P717
    machine.Pin(17)

    Already using it

    • The three colour lights on the boardsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_onboard_LED.js
  • P826
    machine.Pin(26)
    Reads a voltage, but not while Wi-Fi is onCan put out a real voltage, not just on and off

    Already using it

    • Motor M2src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
    • The speaker — the line the board talks onsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_tts.js
  • P925
    machine.Pin(25)
    Reads a voltage, but not while Wi-Fi is onCan put out a real voltage, not just on and off

    Already using it

    • Motor M3src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
  • P1036
    machine.Pin(36)
    No connector on the boardCan only be read, never switched onReads a changing voltage

    Already using it

    • The microphonesrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_microphone.js
  • P112
    machine.Pin(2)
    Reads a voltage, but not while Wi-Fi is on

    Already using it

    • Button Bsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_buttons.js
  • P1212
    machine.Pin(12)
    Reads a voltage, but not while Wi-Fi is onThis is touch pad D

    Already using it

    • Touch pad Dsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
  • P1318
    machine.Pin(18)
    Shares its connector with P14

    Already using it

    • Motor M4src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
    • Serial on P14/P13 — sendingsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_ports_uart.js
  • P1419
    machine.Pin(19)
    Shares its connector with P13

    Already using it

    • Motor M4src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
    • Serial on P14/P13 — receivingsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_ports_uart.js
  • P1523
    machine.Pin(23)

    Already using it

    • Motor M3src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
  • P165
    machine.Pin(5)

    Already using it

    • Motor M2src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_motion.js
  • P1922
    machine.Pin(22)
    Shares its connector with P20

    Already using it

    • The screen and every other plug-in chip (clock line)src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_oled_text.js
  • P2021
    machine.Pin(21)
    Shares its connector with P19

    Already using it

    • The screen and every other plug-in chip (data line)src/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_oled_text.js

On the board, but on no port

Four of the six touch pads and the speaker’s listening line have no connector at all. They are still pins, they can still clash with each other, and the port table above cannot show them.

  • machine.Pin(13)
    • Touch pad Esrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
  • machine.Pin(14)
    • Touch pad Osrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
  • machine.Pin(15)
    • Touch pad Isrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
  • machine.Pin(27)
    • Touch pad Csrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_touch.js
    • The speaker — the line the board listens onsrc/config/canvas/sheenbot-infinity-blocks/sheenbot_infinity_tts.js

Where does my part go?

Find the kind of part you are holding. The ports that suit it are listed with it.

It measures how much of something

Light, soil moisture, a knob, sound level, gas, a flame: anything that answers with a number rather than yes-or-no. Only these ports can read one while Wi-Fi is on.

Use: P0 · P1 · P2 · P3

It is on or off

A button, a movement detector, a lamp, a fan, a buzzer. Any port with nothing else on it will do — start with the free ones.

Use: P2 · P3 · P6

It has two signal wires

A distance sensor sends on one wire and listens on the other, so it needs a connector that carries two. There are two such connectors.

Use: P1/P0 · P14/P13

It is a smart module with a chip on it

The screen, the movement sensor, the card reader, the colour sensor, the heart-rate sensor, the 7-segment display. They all share one connector and can all be plugged in at once — the board tells them apart by name.

Use: P20/P19

It talks in sentences

The fingerprint reader, the GPS, the robot dog. These send streams of characters and need a connector with a sending and a receiving wire.

Use: P1/P0 · P14/P13

It is a motor

The motor sockets are wired to ports as well, so a motor and a part plugged into its port fight each other. Each channel is listed with the two ports it takes over.

Use: M1 → P0, P1 · M2 → P8, P16 · M3 → P9, P15 · M4 → P13, P14