Git Product home page Git Product logo

Comments (5)

JustinS-B avatar JustinS-B commented on June 18, 2024 1

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.

JustinS-B avatar JustinS-B commented on June 18, 2024 1

@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.

fivdi avatar fivdi commented on June 18, 2024

@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.

lurch avatar lurch commented on June 18, 2024

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.

lurch avatar lurch commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.