Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 9 FirstFirst ... 4 5 6 7 8 ... LastLast
Results 126 to 150 of 206

Thread: Raspberry Pi Pico

  1. #126
    I got two Picos yesterday.
    It took 1 script to set up the developmnet environment on a RPI4 in about 10 minutes, including VSCode which I found impressive.
    I have been using Teensy for few years but never develed below the Arduino layer. I think given the backgroud and support of the RPI foundation, the fact that you can develop including SWD debug all from the PI makes it a very good learming platform for ARM.
    I mainly intend to use it to try to learn more about the underlying processor at a lower level.
    I also think the PIO state machines are very interesting (are there other MPUs with similar ?), being able to off load the CPU for IO tasks. The demo of the complete BBC B emulation running elite with VGA and sound output is impressive.

  2. #127
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    360
    I've read those data and they are not really telling much, apart from the very high sleep power consumption (1400 uA @ 5V).
    Well I guess someone will post real world figures in a few weeks.

  3. #128
    FYI. The second core is working ok so far in micropython using _thread.

  4. #129
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277
    PIC32 have DMA which can manipulate the gpio registers directly which means it can have similar behavior, there is a good book that you can read
    https://energy4all.ru/pic32/books/p32inc.pdf
    Page 353 uses DMA to create a state machine to output VGA data, chapter begins at page 333.
    That book also clearly/easly describes the FAT file system(page 427) and how to access a sd-card in spi mode(page 403).
    It's a good book overall to find some low level stuff in.
    I implemented a own sd-card reading with fat system "library" that I did use on a at32uc3b0256 (it was before there was any smart phones and I was gonna do a touchscreen wireless controller)

  5. #130
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by bigpilot View Post
    https://www.raspberrypi.org/products/raspberry-pi-pico/

    I will be switching because I absolutely hate working with the Arduino IDE on the Teensy 3.X and haven't been able to rig up my own ARM command line dev environment. I find it sad that PJRC hasn't been able to rig up a simple dev environment for power C / C++ users that's wholly seperate from the Arduino IDE.

    The only thing the Pico lacks is an I2S interface which I need for a digital music player I've been wanting to build, but for all other uses the Pico is a perfect drop in replacement and much cheaper than Teensy.
    Two comments. First, I also hate Arduino for all but the simplest projects. I use PlatformIO https://platformio.org with VSCode. It supports the Arduino framework but with more advanced features such as library management, multiple source files, configuration per project, hardware debugging, etc. PlatformIO also supports the mbed framework with Teensy which provides a free RTOS, many library functions similar to Arduino, and drivers for common sensors and other hardware. If you don’t like platformio you can use mbed directly as a web-based graphical IDE or as a full command line toolset.

    Second, while the Pico does not have dedicated I2S hardware, it does offer 4 programmable logic blocks called PIOs. Each PIO can be configured for fast IO operations such as I2S, driving neopixel LEDs, VGA or DVI display output, etc. The data is provided via DMA and the PIOs operate independently of the MCU and thus do not slow it down. many PIO blocks are available now unfortunately I2S is not one of them. But Pimorini has the PIM544 I2S DAC audio board available for pre-order so there will be an I2S PIO module available soon. The other available PIO modules can be viewed at https://github.com/raspberrypi/pico-examples#pio

  6. #131
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,154
    I suggest to block all 'hate' speech on this forum

  7. #132
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,088
    Quote Originally Posted by WMXZ View Post
    I suggest to block all 'hate' speech on this forum
    Lately I've been reconsidering whether to keep the Arduino IDE as Teensy's primarily supported platform, or switch to VS Code (perhaps with Luni's makefile, maybe PlatformIO, or something else....)

    I like Arduino. They are really good people. (well, not that guy who tried to take them over a few year ago - he was a charlatan) But no matter how nice they are personally, no matter how well aligned their overall goals are, I'm having more doubt lately about their long term software developments.

    And yeah, I definitely don't love the Java IDE's editor. I almost always use the "external editor" preference.

  8. #133
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    533
    Quote Originally Posted by PaulStoffregen View Post
    Lately I've been reconsidering whether to keep the Arduino IDE as Teensy's primarily supported platform
    My 2 cents: coming from a background as electronics designer in the days that it was mostly hardware development, software became more and more important. And I must say that the Arduino IDE brought me a lot in developing the software that I needed for embedded systems without becoming a software guru. In all the products and prototypes that I made over the years, the Arduino IDE got the job done.
    In my current job as teacher Mechatronics I see how easy it is for my students to get really involved and enthousiastic in this whole hardware/software development using the Arduino eco system. The ease of use and the relatively small learning curve of Arduino to get things up & running is a great asset.
    So I would definitely like to stick to the Arduino IDE as Teensy's primarily supported platform - it's a great way for me to promote Teensy as an "Arduino-on-steriods" to my students.

    Paul

  9. #134
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277
    Hopefully soon the Arduino pro ide gets to a more functional state.
    As that is just basically VSCODE with a Arduino skin.
    I wonder why it take so long, the auto complete is not finished (when they could just use the one provided by vscode).

  10. #135
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    120
    Quote Originally Posted by manicksan View Post
    Hopefully soon the Arduino pro ide gets to a more functional state.
    As that is just basically VSCODE with a Arduino skin.
    I wonder why it take so long, the auto complete is not finished (when they could just use the one provided by vscode).
    I’ve been pondering a move to PlatformIO and VSCode, though I do like the plug and play nature of the current Arduino (despite the sh*tty editor)... but lockdown has meant all my projects are on hold (as I’m having to do childcare), is there a Beta of Arduino Pro?

  11. #136
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277
    Yes there is an alpha version 0.1.0
    Here is a direct link(as their homepage is messy and to modern in my opinion):
    https://blog.arduino.cc/2020/08/24/c...tter-together/

  12. #137
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    120
    Quote Originally Posted by manicksan View Post
    Yes there is an alpha version 0.1.0
    Here is a direct link(as their homepage is messy and to modern in my opinion):
    https://blog.arduino.cc/2020/08/24/c...tter-together/
    Oh... STILL in alpha!? Many thanks for the link. Perhaps Paul would do well to migrate Teensy to PlatformIO and VSCode!

  13. #138
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277

  14. #139
    I disagree that Arduino is a good IDE for beginners, at least in what respect to the editor. The lacking of complex features can have some advantages for a beginner, but in my opinion things like autocompletion, error marking, method navigation or parameter description are a must for any kind of user.

  15. #140
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    858
    There is a lot to be said for moving into the 21st century in terms of officially supporting gdb (even ftrias/TeensyDebug).

  16. #141
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,005
    I usually try to avoid these type of religious wars and simply try to adapt. Then again I started off with punched cards

    I both like and dislike things about Arduino system. The one major plus is there are some pluses and minuses of their build system. But if everyone uses it, at least you have fighting chance to get things to work the same. Example at least the last time I was using the Visual Micro setup, their library manager code would choose the library that is installed by Arduino/Teensyduino over the one in your library folder, which is opposite of Arduino, so build one way and it works one way, built it another way and works differently, sometimes in very subtle ways.

    I do agree that when I am working with the Arduino IDE it is missing some of the basics that most IDEs have, like showing the error markings and for those of us who work with libraries, the ability to view and edit the library... So I mostly do all of this with external editors. And for anything other than quick and dirty, I will build within sublimetext using the Arduino build system. This works reasonably well, but still a few gotchas...

    Or one develops libraries that may use a configuration file and allow overrides by using something like has included mechanism, which worked OK in makefiles or the like, but does not work in the Arduino IDE when you try to do it in the sketch folder.

    As for some advanced features like Autocomplete, sometimes I like it, sometimes I don't...

    I also wish at times the Arduino IDE would spend just a little time fixing low hanging fruit: Simple things like use external Editor. Why is this a global switch in preference file? Why can I not simply turn it on for one project(Window) that I am currently working on? Or better yet, why doesn't the IDE simply check either all of the time or when the window gets focus to see if files have changed and either automatically update if no changes were pending in the file and/or ask the user if they wish to update to current...

  17. #142
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,447
    Quote Originally Posted by PaulStoffregen View Post
    Lately I've been reconsidering whether to keep the Arduino IDE as Teensy's primarily supported platform, or switch to VS Code (perhaps with Luni's makefile, maybe PlatformIO, or something else....)
    In my opinion the meanwhile very broad user base of the Arduino ecosystem has just too many different expectations, use cases and capabilities to find a one fits all solution. Since the IDE market is currently quite volatile anyway, why put a lot of resources into "supporting" one of the various solutions? It might be much better to just make life for the developers and maintainers of those open source projects easier and provide easily obtainable information they need to adopt their systems.

    Here a few examples from my own experience (VisualTeensy & TeensySharp)

    • Boards.txt and platform.txt are a nightmare to parse. Having the relevant information in a xml / json format would be much easier
    • To compile a Teensy sketch one only needs to download the Teensyduino repo and install GCC no other source files from Arduino are needed. But to find out the required compiler settings one needs to get hold of a current copy of boards.txt which requires an installation of the complete Arduino IDE. Would be much easier if boards.txt/platform.txt would be bundled with Teensyduino (or available at another "official" downloadable place
    • In principle one can download GCC from the usual places. Unfortunately one needs to copy some math libraries to the GCC installation. Would be much easier if a standard GCC installation could be used and additionally used libraries would live somewhere in Teensyduino or if they could be downloaded from an official source.
    • Would be good if the Halfkay upload protocol is documented to enable customized uploaders. I know that one could analyze the source code of the CLI loader, but you get the idea.
    • Things like setting the date/time at upload for the T4 are not documented. Some smart guy recently put a lot of work into reverse engineering the protocol for the T4, so that finally tyCommander can use it. Would be helpful for third party developers to have such information readily available.


    I'm sure that Teensy would be quickly integrated into all major (and minor) development systems without much work for PJRC if it would be easier to obtain such information.

  18. #143
    Quote Originally Posted by manicksan View Post
    Hopefully soon the Arduino pro ide gets to a more functional state.
    As that is just basically VSCODE with a Arduino skin.
    I wonder why it take so long, the auto complete is not finished (when they could just use the one provided by vscode).
    IIRC, the Arduino Pro IDE is based on Eclipse Theia, which is an open-source VSCode alternative. The problem with VSCode is that it's not really open-source. It's built on open-source and large parts of the source code are available, but the binaries distributed by Microsoft are not open-source.
    Microsoft's own extensions, such as the C/C++ extension are not actually open-source, and their licenses do not allow you to use them in anything but the official (proprietary) Microsoft releases of VSCode.

    While I understand Arduino's decision to go for an open-source alternative, an official, well-supported VSCode extension would probably have been less time consuming, and useful to a larger percentage of Arduino users. Especially since they market the Pro IDE towards experienced users, I don't think creating a new IDE that copies the (terrible) user interface of the old IDE was necessary.
    I generally dislike Microsoft, but VSCode is a great product, and they have some very smart people in their C++ team, so I think an official Arduino VSCode extension that nicely interfaces with the existing C++ language support, debugger, git integration etc. of VSCode would have been a better alternative than yet another IDE.

    Quote Originally Posted by JotaEfe13 View Post
    I disagree that Arduino is a good IDE for beginners, at least in what respect to the editor. The lacking of complex features can have some advantages for a beginner, but in my opinion things like autocompletion, error marking, method navigation or parameter description are a must for any kind of user.
    I agree 100%.

    The instant feedback you get from syntax highlighting and error squiggles is invaluable when learning a new language. Autocompletion is amazing for productivity, it exposes you to functions and classes you otherwise wouldn't have known existed, and “hover for documentation” saves you a lot of time going back and forth to online documentation (which goes first, the source or the destination of memcpy?). Simple “quick fix” actions also go a long way (e.g. “You tried to include this header but you don't have the library installed, do you wish to install it?”).
    The Arduino IDE gives no feedback whatsoever until you hit compile, and its syntax highlighting is completely oblivious to any parsing context, which can be very confusing to beginners.

    One of the worst things about the Arduino IDE is in my opinion the compiler output. When there's an error in your code, all you get is the raw, monochrome compiler output (with sometimes a single-line “summary” by the IDE), and you have to scroll up to the top yourself to see the actual error, not just the other errors caused by the initial error. If you enable warnings (as you should), it's even worse, because all warnings it might find in third-party libraries end up in the same output. Combine this with the poor error descriptions of the ancient compilers they sometimes use, and you get something that's completely unintelligible to beginners.
    Most modern IDEs have an easy to read “Problems” panel, that has each error in a separate cell, with the first error at the top, it jumps to the source code location when you click it, it makes a clear distinction between errors and warnings, etc.
    If Arduino updated their compilers to GCC 9 or 10 for better diagnostics and error messages, enabled colored output, and showed the first error first, that would already be a huge improvement in my opinion. (Updating compilers might be risky, of course, but you'll have to do it eventually, and strike a balance between backwards compatibility and user friendliness.)

    In my eyes, the Arduino IDE and the core API didn't really see any large improvements in the last couple of years. They had the opportunity to redesign some things in their new ArduinoCore-API, but there weren't any significant improvements to the core “language”, and some APIs even got worse and broke backwards compatibility (such as the PinStatus enum). In that sense, I think it's a good development to see Raspberry Pi come out with a new, well-documented API to give the Arduino folks some competition and an incentive to improve their API and documentation.

    Pieter

  19. #144
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    338
    +1 for PlatformIO and VSCode. The combination is remarkably easy use, though it does have a slightly steeper learning curve than the Arduino IDE.

    What the PlatformIO team has accomplished is amazing. A HUGE set of supported boards, frameworks and platforms that is dead simple to get installed and running. It's really transformative for embedded development.

  20. #145
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by WMXZ View Post
    I suggest to block all 'hate' speech on this forum
    replied to
    Quote Originally Posted by mlewus View Post
    Two comments. First, I also hate Arduino for all but the simplest projects. I use ...
    WMXZ is right. I regret my use of the word ‘hate’ and did not mean it in a pejorative sense. ‘Do not prefer’ would have been more accurate. However I should know better when posting to a public forum.

  21. #146
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277
    Eclipse Theia is based on VSCODE which is based on Electron

    https://en.wikipedia.org/wiki/Eclipse_Theia
    https://en.wikipedia.org/wiki/Visual_Studio_Code

    But they say that the binaries are freeware.

    And as you say the cpptools can only be used with VSCODE (as intellisense is a "brand" of microsoft).

    But then again
    VSCODE + Platform IO is the best option for all advanced users including myself,
    also it have support for so many microcontrollers,
    which is a good thing when working with many types of micros
    including PIC AVR ST ESP.

    I don't really prefer the Arduino IDE either,
    but I have done some extensions to it anyway to make it easier for some people including myself when doing some tests on it.
    There is planned (just for fun) file browser + autocomplete extensions to be made
    (the autocomplete is already done and is used by the Processing IDE, sad that the arduino team did not implement it as well)
    but what the autocomplete now need is the arduino syntaxes to be implemented

  22. #147
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    IIRC PlatformIO can also run on Atom, Eclipse, Eclipse Che, and others if you are looking for an open source alternative.

  23. #148
    Junior Member
    Join Date
    May 2020
    Posts
    10
    I currently use PlatformIO Core + vim and works like a charm, but VSCode integration seems really good. I am quite satisfied with the current state of Teensy in this regard, not sure what else could be done to improve the experience (besides what I said in previous posts)

  24. #149
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    277
    I can also agree that Arduino IDE is NOT for beginners
    it's like more for advanced programmers who know every syntax
    and for those that never make any errors.

    But then again the tabs that is not scrollable
    oh yes there is the little small down arrow icon which lists all the tabs
    but then you really don't need the tabs except if you use a ultrawide screen (which is not healthy)

    Atom is also own by microsoft theese days.

  25. #150
    Member
    Join Date
    Jan 2014
    Location
    New Jersey, USA
    Posts
    63
    Quote Originally Posted by manicksan View Post
    Atom is also own by microsoft theese days.
    Geez, soon they will own everything

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •