Comments (5)
Thank you both for your patient replies. As @lurch pointed out, the important bit of information that I had missed was that all the examples default to UART stdio, which makes life really simple if you are running everything from a Raspberry Pi.
@lurch Yes, you are right, flash_program is not blink, sorry, I copied the wrong file name by accident.
@fivdi Yes, that Pi forum post describes how to enable USB stdio for the I2C sketches, as opposed to the default UART stdio
However, for the record, the errors that I listed above can easily be resolved by adding these definitions like these to the example that you need to compile.
#define i2c_default i2c0
#define PICO_DEFAULT_I2C_SDA_PIN 4
#define PICO_DEFAULT_I2C_SCL_PIN 5
from pico-examples.
@lurch yes, sorry, you are 100% right on that one as well. I had used an Arch Linux AUR installer for the SDK, which it turns out wasn't updating. As soon as I uninstalled it and cloned the SDK myself, all of those compile errors instantly stopped. Thank you.
from pico-examples.
@JustinS-B Is this issue the same as the issue that was discussed and resolved on the Raspberry Pi forum at https://www.raspberrypi.org/forums/viewtopic.php?f=144&t=307375? If so, please close this GitHub issue.
from pico-examples.
flash_program.uf2 compiles without error, and it runs when I drop it into my Pico, and the LED flashes as expected
That example specifically demonstrates writing to flash, the example for blinking the LED is blink
🙂
hello_usb.uf2 also appears to compile without error, and it also runs when I drop it into my Pico. I can see /dev/ttyACM0
mpu6050_i2c.uf2, lcd_1602_i2c.uf2 and i2c_bus_scan.uf2 compile with the following warnings, /dev/ttyACM0 is not created
IIRC hello_usb
is the only example that uses USB stdio, all the other examples (that use stdio) use UART stdio (because this makes debugging easier). It's easy to update each of the examples to use USB stdio though, see chapter 4 of https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf
The compile-warnings you're seeing look like you might be building pico-examples
against an older version of pico-sdk
? They're both updated reasonably regularly.
from pico-examples.
However, for the record, the errors that I listed above can easily be resolved by adding these definitions like these to the example that you need to compile.
... which are also set in https://github.com/raspberrypi/pico-sdk/blob/master/src/boards/include/boards/pico.h which is why I was wondering if you were using an older pico-sdk (from before these were added) ?
from pico-examples.
Related Issues (20)
- Include some description about RGBW vs RGB in ws2812 example
- Question about the LCD_1602_i2c HOT 1
- [Question] Basic gatt ble server on Pico W HOT 3
- LCD1602_I2C Example does not work HOT 26
- PicoW Peripheral Secure Connection HOT 7
- Make sure there's an example of using stdio_set_chars_available_callback HOT 2
- Flashing pico fails HOT 4
- Add example of using TinyUSB CDC with extra stdio_usb iface
- Modify the pio uart examples to use DMA HOT 1
- ping examples hardcode an IP address
- Recommended launch.json is slow to connect due to no "adapter speed" setting
- No key press detected for pending in [iperf server] example HOT 1
- stdio_usb input available callback can't call other stdio functions, and pico-examples iperf assumes it can. HOT 3
- UART RX Garbage data recived HOT 5
- Pico-W to Pico-W STALL while sending UDP HOT 2
- Bug in BME280 SPI example when reading compensation parameters for humidity HOT 3
- Out-of-Memory Errors When Publishing MQTT Messages HOT 1
- host_cdc_msc_hid: incorrect len parameter in tuh_hid_report_received_cb HOT 1
- Bug in pio/uart_rx /uart_rx_intr.c HOT 6
- ir_nec variable length commands HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pico-examples.