Coder Social home page Coder Social logo

Comments (13)

earlephilhower avatar earlephilhower commented on May 20, 2024

Can you undo your library edits and try PR #59 and report back?

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

now i'm getting this error:

C:\Users\x\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\0.9.13\cores\rp2040/Arduino.h:28:10: fatal error: api/ArduinoAPI.h: No such file or directory
   28 | #include "api/ArduinoAPI.h"
      |          ^~~~~~~~~~~~~~~~~~

And I'm not sure if that is because i "installed" the test build wrong...
I removed the avr folder i added, and reverted the changes to the TFT Library.
then I downloaded the "avr" branch and replaced the files that got changed with the newly downloaded ones.

I'm sorry, i'm not that great at using github.

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

I assume you're using a git clone, yes? In that case make sure you do the git submodule update --init in the main clone directory and in the pico-sdk directory (see the readme for examples).

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

no i just directly downloaded it from the site.
as said i'm not good at the whole github thing.

i'll try with git, but i'm running windows so the commands in the README.MD don't really work without modifying them.
speaking of which, why do they seem to download and install the board into the Arduino folder where your skteches are located /home/earle/Arduino instead of the folder that holds all the boards home/earle/.arduino15?
or am i missing something?

i'm also assuming just running git clone would grab the master branch? so i'll use git clone --single-branch --branch avr instead.

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

I went and build your examples from the original report and they built fine, so I just did a new release. You can delete whatever copies you were working on and try 0.9.14 (I built, but did not test, since I don't have the exact LCD in question).

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

i'm sorry for the inconvenience.

i deleted the old board folder, and downloaded the newest release from the board manager and the OLED sketch compiled, but the TFT one didn't.
it's the same error as before.

In file included from F:\HDD\Arduino\libraries\TFT\src\utility\Adafruit_GFX.cpp:35:
F:\HDD\Arduino\libraries\TFT\src\utility\glcdfont.c:3:10: fatal error: avr/io.h: No such file or directory
    3 | #include <avr/io.h>
      |          ^~~~~~~~~~

just to make sure i reinstalled the TFT Library, and even the whole Arduino IDE. but no change.
i must've missed something
i re

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

That TFT library is busted for 2020, sorry. The #ifdef on top needs to include !defined(ARDUINO_ARCH_RP2040) and it also is using the deprecated port registers as 8-bit pointers . The RP2040 has 32b GPIO registers, and accessing it as an 8-bit address will really mess things up both on reads and especially on writes.

-edit- Not intending to be a butthead about this. I'm sure when there's an official Arduino port they'll go through and make it work there. But, even so, the same issues will appear for them to fix. It's just one of the pains of keeping support for dozens of CPU architectures over decades...

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

Err..I meant "busted for 2021". It's been a long decade. :)

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

dammit, it's a built-in Library as well. i would've expected those to be up-to-date.
but since they want to add RP2040 support anyways they have to fix all built-in libraries as some point... hopefully.

some better news, the OLED Display is actually working, somewhat fast too.
though there must be a bottleneck in my program, even setting the I2C clock to 800kHz doesn't speed it up a lot. hmm
anyways, thanks for the quick help. a for the TFT library, i guess i'll just wait til it's updated?

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

Still, good news! You can try overclocking (up to 250 seems to work for everyonr so far) via the menus if it is Pico code that's the bottleneck. Good luck!

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

no matter what i set the I2C clock, or the CPU's Clock to a frame basically always takes the same amount of time.

does the Wire Library even support different I2C speeds for the RP2040? (datasheet says it can be anything between 0-1MHz.
i wish i had an oscilloscope to see what the data lines are doing.

anyways that is not relevant to this issue anymore. i don't want to derail this too far.

from arduino-pico.

earlephilhower avatar earlephilhower commented on May 20, 2024

Wire.setClock(1000*1000) will set I2C to run at 1MHz. Default is 100KHz (many devices do not run w/1MHz clocking).

from arduino-pico.

ProxyPlayerHD avatar ProxyPlayerHD commented on May 20, 2024

yea i tried that, i used both 100kHz and 1MHz, the SSD1306 seems to be able to handle both perfectly fine, but the time it takes to draw a frame is still the same (~10ms). maybe there is something between the Program and the hardware where the frequency gets lost or something.

here the code i used in case you want to search for some error: PASTEBIN

from arduino-pico.

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.