Skip to content

A compact and comprehensive Raspberry Pi Pico W based Learning Kit having onboard actuators, sensors, and LEDs makes learning enjoyable. The PiCoder is loaded with many features that are going to help you learn and explore many opportunities in the field of computer science and electronics.

License

Notifications You must be signed in to change notification settings

sbcshop/PiCoder-Software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiCoder - Pico Learning Kit

100% DIY | 100% Programmable| L&D | RPi Pico | LED Matrix | LDR | 3.2" Touch LCD | BME280 | Ultrasonic Sensor | RFID | Dual USB | POT

A compact and comprehensive Raspberry Pi Pico W based Learning Kit having onboard actuators, sensors, and LEDs makes learning enjoyable.

The PiCoder is loaded with many features that are going to help you learn and explore many opportunities in the field of computer science and electronics.

PiCoder is an all-in-one STEM learning kit that allows students to work directly with the most common hardware components used in DIY projects. Features the most well-known Raspberry Pi Pico, which enjoys strong community support.The most popular programming languages, Micropython, Ciruitpython, and Arduino, are supported across platforms.

Because the lesson for the PiCoder kit is mostly based on Micropython, it is advised that you understand the very fundamentals of Python. This GitHub provides details and step-by-step instructions how to use PiCoder kit.

Pinout

Getting Started with PiCoder

1. How to Install Boot Firmware in Pico W of PiCoder kit

  • Mostly, Picoder will be provided with firmware pre-installed, so you can skip this step if firmware is already present and directly jump start programming by following the below Step 2.

  • How to know whether firmware is already present in your PiCoder: for this, just connect your PiCoder to your laptop, and if no extra device is detected, that means your PiCoder has it.

  • And if you connect the PiCoder to a laptop without pressing the boot button, if it shows mass storage device named as "RPI-RP2" like the one below, then the firmware is not installed.

  • In this case, you need to add MicroPython firmware in PiCoder. First, you need to Press and Hold the boot button on pico W of PiCoder, and then, without releasing the button, connect it to PC/laptop using micro USB cable. Check below image for reference,

  • Now your device is in boot mode, and you will see a new mass storage device named "RPI-RP2" as shown in the below figure.

  • Download the MicroPython firmware file provided in this repo above as "PiCoder_firmware.uf2" or to download the latest firmware file from the official site, visit here           

  • Drag and drop the MicroPython UF2 - "PiCoder_firmware.uf2" file provided in this github onto the RPI-RP2 volume. Your Pico W will reboot. You are now running MicroPython on PiCoder.

2. Running First Program in PiCoder

  • Download Thonny IDE from Download link as per your OS of PC/laptop and install into your system.

  • Once done start Thonny IDE application, connect PiCoder kit with laptop/PC using micro usb cable.

  • Download complete PiCoder software github and extract, so you can try example demo codes which is provided.

  • Open any one example in Thonny IDE. Select device at the bottom right with a suitable COM port, as shown in the below figure. You might get a different COM port.

  • If everything ok then you will get success message like as shown in below image,

  • Before trying any example script make sure you have picoder.py lib file present in PiCoder. If not, proceed to step 3 to move the file within PiCoder's Pico.

  • With Demo LED Blink code open in IDE, click on Green Play Button or F5 to run script code.

  • This is solely useful for testing code before moving it to PiCoder. However, in order to run the script without an IDE, you must first move it to PiCoder. To accomplish this, proceed to step 3 below.

3. How to Move Script Codes or Any Files to PiCoder

  • Check that the file view is selected in Thonny IDE; if not, go to View > Files. This makes the computer and Pico folders visible.

  • Open code script you want to move, click File > Save a Copy > Select Raspberry. Now name of code script must be main.py and select yes to overwrite previous.

  • While moving lib file don't rename, maintain original name picoder.py, alternative file transfer method if renaming is not necessary->

Lessons

Save whatever example code file you want to try as main.py to Pico/ Pico W of PiCoder as shown in above steps, also make sure you added picoder.py lib file with default name. In example folder you will find demo example script code to test onboard components of PiCoder.

Checkout below lessons for each components and corresponding example links:

Lesson 1 : How to Blink LED

Objective: In this chapter we will try to blink onboard LED using Pico W of PiCoder. There are two leds available.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W LED
    GP14 LED1
    GP28 LED2
  • Software code will use:

  • Example code: Demo_LED.py

  • Open code in Thonny IDE, select Raspberry Pi Pico board with proper COM port.

  • Click Green play button to run directly and make sure to transfer picoder.py library in PiCoder's Pico.

  • For standalone save this Demo_LED.py code into PiCoder's Pico as main.py. Now, whenever power up you will see LED starts blinking.

Lesson 2 : How to play Buzzer of PiCoder

Objective: In this chapter we will learn to play onboard Buzzer of PiCoder.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W BUZZER
    GP22 BUZ
  • Software code will use:

    • Library => picoder.py
    • Class => BUZZER
    • Methods => on, off
  • Example code: Demo_Buzzer.py

  • Open code in Thonny IDE, select board with proper COM port.

  • Click Green play button to run directly and make sure to transfer picoder.py library in PiCoder's Pico.

  • For standalone save this Demo_Buzzer.py code into PiCoder's Pico as main.py. Now, whenever you power up board you will see buzzer beeps in regular interval.

Related Examples:

  • Buzzer Tone : Create sound by changing frequency and intensity

Lesson 3 : Read value of POT

Objective: Here we will learn about various methods for reading the value of the PiCoder's onboard potentiometer.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W POT
    GP27 ADC1
  • Software code will use:

    • Library => picoder.py
    • Class => POT
    • Methods => readPercent, readRaw
  • Example code: Demo_POT.py

  • Run code in Thonny IDE, and rotate POT to see change in value presented on shell terminal

Lesson 4 : How to rotate Servo motor

Objective: This lesson gives idea how you can easily rotate servo motor shaft with some angle 0-180 degree.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W SERVO
    GP15 SIG
  • Software code will use:

    • Library => picoder.py
    • Class => SERVO
    • Methods => move, servo_Map
  • Example code: Demo_Servo.py

  • Checkout also example to control Servo using POT : Demo_Servo_POT.py

Lesson 5 : How check status of Button

Objective: We will learn how to read status of Button if pressed or Not.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W BUTTON
    GP0 BT1
    GP4 BT2
    GP6 BT3
    GP19 BT4
  • Software code will use:

    • Library => picoder.py
    • Class => BUTTON
    • Methods => read
  • Example code: Demo_Button.py

  • Open and Run code in Thonny IDE, press button to see status change.

  • Turn on and off LED using Button example : Demo_Button_Combine.py

Lesson 6 : How to read LDR sensor for Light detection

Objective: We will learn how to read onboard LDR sensor value of PiCoder.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W LDR
    GP26 ADC0
  • Software code will use:

    • Library => picoder.py
    • Class => LDR
    • Methods => read, readPercent
  • Example code: Demo_LDR.py

  • Open and run code in Thonny IDE, change room light condition to see variation in LDR value

Lesson 7 : How to read BME280 sensor of PiCoder

Objective: This lesson guides how to use BME280 for getting Temperature, pressure and relative humidity.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W BME280
    GP20 SDA
    GP21 SCL
  • Software code will use:

    • Library => picoder.py
    • Class => BME280
    • Methods => temperature, pressure, humidity
  • Example code: Demo_BME280.py

  • Open and run code in Thonny IDE, you will get current room temperature, pressure and relative humidity value in terminal

Lesson 8 : How to use Ultrasonic Sensor of PiCoder

Objective: Here you will learn to know distance of object using Ultrasonic sensor. You can get value either in cm or inch.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W ULTRASONIC SENSOR
    GP17 ECHO
    GP16 TRIG
  • Software code will use:

    • Library => picoder.py
    • Class => ULTRASONIC
    • Methods => read, read_in
  • Example code: Demo_UltrasonicSensor.py

  • Open and run code in Thonny IDE, move some object infront of Ultrasonic sensor to get distance value of object.

Lesson 9 : Working with RFID Module of PiCoder

Objective: This lesson demonstrates how to scan and read 125KHz RFID Card value using onboard RFID module of PiCoder.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W RFID
    GP5 RFID_TX
  • Software code will use:

    • Library => picoder.py
    • Class => RFID
    • Methods => read
  • Example code: Demo_RFID_module.py

  • Open and run code in Thonny IDE. Now bring any RFID card around module to read it.

  • Scan status is indicated by LED, audio alert issued using Buzzer and RFID card value printed on terminal

Lesson 10 : Create amazing visuals with 8x8 LED MATRIX

Objective: Learn to generate colourful LED patterns on 8x8 LED MATRIX.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W 8X8 LED MATRIX
    GP18 RGB
  • Software code will use:

    • Library => picoder.py
    • Class => LEDMATRIX
    • Methods => on, off, pixelon, pixeloff, chaser
  • Example code: Demo_RGBLEDMatrix.py

  • Open and run code in Thonny IDE to see various colour production and individual LED control

  • Checkout this example how to create patterns : RGBChaserPattern.py

Lesson 11 : Working with 3.2" Touch LCD of PiCoder

Objective: This tutorial guides how to use 3.2" Touch LCD to create Interactive Visuals, generate graphics and see working of capacitive touch.

Hardware Connection:

  • Make sure you have put the jumper shown below,

    Pico W 3.2 Touch LCD
    GP13 BL
    GP12 RST
    GP11 DIN
    GP8 D/C
    GP10 CLK
    GP9 CS
    GP2 SDA
    GP3 SCL
  • Software code will use:

    • Library => picoder.py
    • Class => LCD, TOUCH, RGB
    • property => touches, touched
    • Methods => getXY, draw_circle, fill_circle, clear, more
  • Example code:

Lesson 12 : Display Image on PiCoder

Objective: Learn to display image file on PiCoder's screen.

  • Follow same connection steps as shown in lesson 11

  • Download sample images or if you want to convert your images then checkout guide to convert image file into raw image here.

  • Transfer image file to Pico of PiCoder and try below example code.

  • Example code: Demo_imageDisplay.py

Detail Explanation of picoder.py Lib file is available here.

Now you are ready to try out your own codes and build awesome projects with PiCoder, Happy Learning!

Resources

Related HAT Products

3vPicoRelayBoard

1.14” LCD HAT

Motor Driver HAT

Ethernet_HAT

Barcode_Reader_HAT

Product License

This is open source product. Kindly check LICENSE.md file for more information.

Please contact support@sb-components.co.uk for technical support.

About

A compact and comprehensive Raspberry Pi Pico W based Learning Kit having onboard actuators, sensors, and LEDs makes learning enjoyable. The PiCoder is loaded with many features that are going to help you learn and explore many opportunities in the field of computer science and electronics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages