Size: 3033
Comment:
|
← Revision 20 as of 2025-02-20 17:47:17 ⇥
Size: 4382
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
* https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf | |
Line 10: | Line 11: |
* https://github.com/raspberrypi/pico-sdk.git * https://github.com/raspberrypi/pico-examples.git |
|
Line 12: | Line 15: |
[[ https://datasheets.raspberrypi.com/pico/RPi-Pico-R3-PUBLIC-20200119.zip | Raspberrypi pico design files]] |
|
Line 74: | Line 79: |
== ADC2 GP28 PIN34 (hello_adc.c) == * https://github.com/raspberrypi/pico-examples/blob/master/adc/hello_adc/hello_adc.c {{{#!highlight c adc_init() adc_gpio_init(28) adc_select_input(2) uint16_t res = adc_read() conversion_factor = 3.3f/(1<<12) }}} == ADC4 onboard temperature sensor (onboard_temperature.c) == In the section '''4.9. ADC and Temperature Sensor''' available in [[https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf | rp2040 datasheet]] it's mentioned that ADC4 reads values from an onboard temperature sensor. * https://github.com/raspberrypi/pico-examples/blob/master/adc/onboard_temperature/onboard_temperature.c {{{#!highlight c adc_init() adc_set_temp_sensor_enabled(true) adc_select_input(4) uint16_t res = adc_read() conversion_factor = 3.3f/(1<<12) }}} == /etc/rc.local in Raspbian to init ttyACM0 == {{{#!highlight sh #!/bin/sh -e /usr/bin/logger "Initialize port ttyACMO for raspberry pico" chmod 666 /dev/ttyACM0 stty -F /dev/ttyACM0 raw speed 115200 -crtscts cs8 -parenb -cstopb exit 0 }}} |
Raspberry Pi Pico
Contents
https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf
https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
https://mauser.pt/catalog/product_info.php?cPath=1667_2620_1672&products_id=095-0598
https://mauser.pt/catalog/product_info.php?cPath=1667_2620_1672&products_id=095-0596
Raspberry Pi Pico is a low-cost, high-performance microcontroller board with flexible digital interfaces.
raspberry pi pico pinout
Run-Reset button (right side)
To help set mass storage with BOOTSEL + RUN-Reset button
Connect with micro-usb
Click on BOOTSEL button to enable mass storage
1 sudo dmesg
2 # [ 3570.065996] usb 1-4.3: Product: RP2 Boot
3 # [ 3570.066006] usb 1-4.3: Manufacturer: Raspberry Pi
4 # [ 3570.066016] usb 1-4.3: SerialNumber: E0C9xxxxxxxx
5 # [ 3570.163372] usb-storage 1-4.3:1.0: USB Mass Storage device detected
6 # [ 3570.164049] scsi host2: usb-storage 1-4.3:1.0
7 # [ 3570.164381] usbcore: registered new interface driver usb-storage
8 # [ 3570.180142] usbcore: registered new interface driver uas
9 # [ 3571.192940] scsi 2:0:0:0: Direct-Access RPI RP2 3 PQ: 0 ANSI: 2
10 # [ 3571.194468] sd 2:0:0:0: Attached scsi generic sg1 type 0
11 # [ 3571.195164] sd 2:0:0:0: [sdb] 262144 512-byte logical blocks: (134 MB/128 MiB)
12 # [ 3571.195818] sd 2:0:0:0: [sdb] Write Protect is off
13 # [ 3571.195830] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
14 # [ 3571.196325] sd 2:0:0:0: [sdb] No Caching mode page found
15 # [ 3571.196335] sd 2:0:0:0: [sdb] Assuming drive cache: write through
16 # [ 3571.217448] sdb: sdb1
17 # [ 3571.237585] sd 2:0:0:0: [sdb] Attached SCSI removable disk
18
Serial USB ttyACM0
1 sudo dmesg
2 # [9067045.808125] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
3 # [9067045.941554] usb 1-1.3: New USB device found, idVendor=2e8a, idProduct=000a, bcdDevice= 1.00
4 # [9067045.941564] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
5 # [9067045.941568] usb 1-1.3: Product: Pico
6 # [9067045.941572] usb 1-1.3: Manufacturer: Raspberry Pi
7 # [9067045.941577] usb 1-1.3: SerialNumber: E661xxxxxxxxxxxx
8 # [9067045.944106] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
9 apt install picocom
10 picocom -b 115200 --echo /dev/ttyACM0
11 # on
12 # Led is ON 5
13 # Periodical timer at 4238154004018
14 # on
15 # Led is ON 5
16 # off
17 # Led is OFF 5
18 # on
19 # Led is ON 5
20 # Periodical timer at 4238164004155
21 # gp21on
22 # GP21 is ON
23 # ctrl+a , ctrl+x
24 # Thanks for using picocom
25
ADC2 GP28 PIN34 (hello_adc.c)
ADC4 onboard temperature sensor (onboard_temperature.c)
In the section 4.9. ADC and Temperature Sensor available in rp2040 datasheet it's mentioned that ADC4 reads values from an onboard temperature sensor.