Professional Documents
Culture Documents
PiPico Intro
PiPico Intro
Pi Pico
• UNO
• MEGA 2560
• Mini
• Micro
8
Neo Mechaboard
• 2 stepper drivers
• 1 L293D
• Onboard regulator
• Breadboard friendly
• has WiFi
9
Pi Pico W pins
10
Programming Alternatives
• Very low level (not a real alternative :)
– 01101…
• Low level:
– Assembly
• High level:
– Basic
– C - what Arduino complies with
– Pascal
RS232
Parallel port
USB
Directly program the
ATMEL microprocessor
on the
Arduino Board
a. b. koku – METU ME Lectures
Booting the Loader
Program Memory
• By default the bootloader
Bootloader code
runs at each program start
• If there is a download
attempt from the computer
bootloader reads the new User Program
program and writes it in User
Program area
• If no download attempt is
detected, last loaded User Free Memory
Program program will be
executed.
boot.py
main.py
and more…
19
boot.py or boot.txt
code.py or code.txt
and more…
https://learn.adafruit.com/circuitpython-essentials
20
Dev UIs: Thonny
https://thonny.org/
https://github.com/thonny/thonny/wiki/Linux 21
Dev UIs: MU
https://codewith.mu/en/download
22
CLI tools: ampy
You can ls, and manipulate and run files
- pip3 install adafruit-ampy
Try ls
- ampy --port /dev/ttyACM0 ls
23
CLI tools: rshell
You can ls, and manipulate and run files
- pip3 install rshell
help
24
CLI tools: good old screen
- connect via shell such as:
25
Quick Reminder
• Voltage across a resistor is proportional
to the current passing over this resistor.
• V = IR
• What are resistors?
• Why do we use them (then)?
a
Micro
Controller
Min R2= ?
9 10
1 18
What value is read on PIN 13
when the button is NOT
a pressed?
Micro
Controller
What value is read on PIN 13
when the button is pressed?
9 10
1 18
What value is read on PIN 13
when the button is NOT
a pressed?
Micro
Controller
What value is read on PIN 13
when the button is pressed?
9 10
0 t
Initial Finally
Connection Contact Closed
Typically 10-20ms
a. b. koku – METU ME Lectures
Debouncing
• Software solution
– When the state of the pin changes, wait
for a certain amount of time, and then if
the state remains changed, call it then,
not sooner.
• Hardware solution
– Schmitt Trigger:
36
Communication Challenge
How to get in touch with PC with and without Wifi:
You can use the bugeval function on the course website as reference
37