Arduino low power alternatives

Advert

Arduino low power alternatives

Home Forums Electronics in the Workshop Arduino low power alternatives

Viewing 8 posts - 26 through 33 (of 33 total)
  • Author
    Posts
  • #489718
    Andy Stopford
    Participant
      @andystopford50521
      Posted by Versaboss on 08/08/2020 14:39:05:

      Posted by Andy Stopford on 07/08/2020 20:53:10:

      Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

      I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

      Hi Andy,

      as a sometimes Arduino user I'm always interested in such stuff. However, all is not so easy. I managed to install the Atom editor, and then tried in vain to cooperate it with PlatformIO. What I now have, if I start Atom, is a black screen with a menu bar. There is also a menu point for PlatformIO. But after say a minute I get the message 'editor isnot responding.
      I deleted Atom and re-installed it, with the same result.
      And btw, IF that system would work, how could one compile the code and load it up into an Arduino? Copy/Paste to the Arduino IDE?

      Regards,
      Hans

      Hi Hans,

      It looks like there might be a problem with the latest version of Atom (always a possibility with actively developed Open Source stuff), see this thread:

      https://github.com/platformio/platformio-atom-ide/issues/2377

      As suggested in the 3rd to last post there, it might be better to use the VS Code version, which being a Microsoft product, is likely to be more reliable than Atom. I shall have to look into that.

      Anyway, in either case, it will compile and upload your code in the same way as the Arduino IDE, and it has a Serial window which you can read, interact with, etc if required, again like the Arduino one.

      Advert
      #489727
      SillyOldDuffer
      Moderator
        @sillyoldduffer
        Posted by Andy Stopford on 08/08/2020 20:35:34:

        Posted by Versaboss on 08/08/2020 14:39:05:

        Posted by Andy Stopford on 07/08/2020 20:53:10:

        Lastly, do yourself a favour and ditch the Arduino IDE – there are much better, easier to use alternatives, with full code completion, hints, colour coding, etc.

        I use PlatformIO; it's available as a code editor plugin. I like the Atom editor, but you can use it with VSCode, and, possibly, others.

        Hi Andy,

        as a sometimes Arduino user I'm always interested in such stuff. However, all is not so easy. I managed to install the Atom editor, and then tried in vain to cooperate it with PlatformIO. What I now have, if I start Atom, is a black screen with a menu bar. There is also a menu point for PlatformIO. But after say a minute I get the message 'editor isnot responding.
        I deleted Atom and re-installed it, with the same result.
        And btw, IF that system would work, how could one compile the code and load it up into an Arduino? Copy/Paste to the Arduino IDE?

        Regards,
        Hans

        Hi Hans,

        It looks like there might be a problem with the latest version of Atom (always a possibility with actively developed Open Source stuff), see this thread:

        https://github.com/platformio/platformio-atom-ide/issues/2377

        As suggested in the 3rd to last post there, it might be better to use the VS Code version, which being a Microsoft product, is likely to be more reliable than Atom. I shall have to look into that.

        Anyway, in either case, it will compile and upload your code in the same way as the Arduino IDE, and it has a Serial window which you can read, interact with, etc if required, again like the Arduino one.

        Like Hans I've tried PlatformIO and run into the same problem. Not easy to set up is it? The advantage appears to be support of multiple Frameworks and Boards from a common IDE, but it's a steep learning curve particularly when installation fouls up.

        I went through the list of supported editors looking for one I liked. Unfortunately none of my favourites are there apart from vim, not my first choice for an IDE. Anyway atom is respectable, and it would make installing PlatformIO easy – except it's broken. Tried a couple of other editors but they lack the IDE integration offered by atom, and presumably vscode. As linux is my preferred platform I'm not keen to add a Microsoft editor! Or to learn Eclipse, Netbeans or one of the other big alternatives. The Platform.IO CLI works in so far as I've tested it, but it's not a beginner tool,

        The Arduino editor may not be the most advanced, but it works and is straightforward to learn. The IDE is workmanlike rather than spectacular but it organises boards and libraries in a fairly obvious way and makes uploading easy too. For most simple purposes it's fine.

        I'm not finding PlatformIO's documentation easy to penetrate. For example, what happens if I want to program a Nucleo? The documentation mentions a 'Bare Metal Proflle', a subset of the OS6 RTOS. I guess from the outline of JSON configuration details that full mbed can be set up and configured but I'm finding it hard work compared with both Arduino IDE and MStudio. Not clear how much is built-in and how much has to be configured.

        I've not spotted a 'must have' reason to change so far. Not given up yet – I'll try vscode tomorrow. Advantages may appear when I get to compiling and uploading. For example my current project runs on both Arduino and Nucleo, with the Nucleo version based on a copy. Be nice to write and manage both as a single project, but I don't imagine many beginners are into that kind of code management.

        Dave

        #489835
        IanT
        Participant
          @iant
          Posted by Bazyle on 06/08/2020 12:31:28:

          Not certain but I think these processors are designed to run on 3.3v because it is available from batteries without using a regulator.

          Although not the same IDE, in fact does not need an IDE and is programmed in Basic, the Micromite is designed with low power features including sleep and clock slowing specifically for running off batteries.

          I am a big fan of Micromites and as Bazyle says – they can be programmed to run at a (battery saving) slower speed or simply put to sleep – all under programme control. The 28pin PIC32 chip only needs an external capacitor to give you a complete working system programmable in MM Basic – the PIC32 chip required is under £4.00 – the s/w being free to download.

          At full wack (48Mhz) the '170 ' chip will typically be drawing just over 30mA but you can programme the CPU clock speed and at 5Mhz the current draw is about 6mA.

          You can also tell the system to "sleep" for a number of seconds or to go to sleep but monitor the "wakeup" pin – the current draw will then fall to about 100 micro amps. So for battery-powered embedded systems, Mites are very useful little creatures.

          Micromite Basic has been ported to other systems – and if low power consumption but with more 'grunt' is required – the 'Armmite F4' based on the STM32F407VET6 board would be worth looking at. You can purchase these STM boards for about £12 and they have a fast ARM Cortex chip with more memory & I/O.

          So whilst Arduino is very popular, there are very good (but lesser known) alternatives and the Micromite family is one of the best for embedded solutions in my view.

          Regards,

          IanT

          #489844
          SillyOldDuffer
          Moderator
            @sillyoldduffer

            Final report on PlatformIO which I have working on Ubuntu 20.04! Took a couple of hours to sort out install glitches:

            • vscode deb package fails
            • two snap packages, of which the Microsoft one renames vscode as code. Both loaded PlatformIO as an Extension, but I reinstalled with Microsoft to get the latest version. Slight confusion, it's called 'code' rather than 'vscode'
            • Importing an existing Arduino project worked except:
              • Didn't find the two contributed libraries I'm using. After flapping around false clues about includepath and vcpkg, turns out contributed libraries have to be imported manually. Not difficult when you know how, but bothersome compared with Arduino IDE. PlatformIO copes with libraries for multiple boards, if needed, but it's more cluttered than Arduino's "me-only"
              • Intellisense (the code completion module) balks at Arduino's .ino suffix so I followed instructions and saved as .cpp
              • Although Intellisense asked for a rename, PlatformIO automatically added .cpp to the old ino name, and complied both causing a shower of duplicate symbol link errors. Fortunately I recognised the symptoms, and sussed out how to delete the unwanted file.
              • Upload failed with an avrdude error which I recognised as due to a Nano peculiarity. Some are sold with 'old bootloader', others with 'new'. Fixed fairly quickly by reconfiguring the project, after which upload success!
              • Activating the monitor got me no-where though because it was set to 9600 rather than 57600 baud. Took ages to find speed isn't set from the IDE; it has to be edited in the PlatformIO.ini configuration file.

            Conclusions. I can see why Andy likes PlatformIO but it isn't a beginner tool. Too many advanced options. vscode and platformio are both fairly intuitive, but suffer from a surfeit of choices. The software is generous with warnings, errors, hints and popups, just what an experienced programmer needs when hunting down awkward problems, but likely confusing noise for a beginner happy to have the editor jump to his suspicious code. An old conundrum: should a development tool give the programmer the full gen, or should it hide details because most of them are irrelevant? I prefer the latter, only looking at gory details when necessary.

            Good stuff – being able to put projects into github, code checking and support for boards galore, plus ability to add you own. Code checking, ie highlighting issues that don't cause compile failures, might lead the beginner astray. Tells me correctly that atomicElementTime can be reduced in scope, but incorrectly flags functions setup() and loop() as unused. Trouble is they are!

            My approach to software development varies. I quite often use vim, make and the command line as if it were still 1980. kate (or geany) are much used as a sort of semiautomatic-IDE for C,C++ and Python projects. The Arduino-IDE is great for Arduino, less satisfactory for some other boards. idle is good for small Python projects. For mbed I've experimented with Cloud, MStudio, and command line approaches. At the moment MStudio is ahead on points! I don't care much for full IDEs like Netbeans or Eclipse because they're over the top for what I do.

            If I could only have one approach on a Desert Island it would be the old-fashioned command line tools because they can do everything! But they ain't easy to learn or use – most of the time simple projects are best done with simple tools. Learn to fly in a Tiger Moth, not a Jumbo Jet

            Meanwhile, I shall explore PlatformIO further. I've certainly not rejected it.

            Dave

            #489878
            Andy Stopford
            Participant
              @andystopford50521

              @SOD

              Atom/PlatformIO seems to work now if upgraded to version 1.49.0. Mine wasn't set up to automatically update and was still on V 1.39. I used the method shown on this page:

              https://flight-manual.atom.io/getting-started/sections/installing-atom/

              And followed the instructions to add the repo for my OS (OpenSuse 15.1).

              I've had another look at (VS-) Code, and I think Atom is more user-friendly (or at least less user-hostile).

              It's a tricky one, simplicity v. all-singing, all-dancing complete solution. Much of the time I think poor documentation is the problem, as you've mentioned.

              Of course, in the world of 'real', physical devices, simple isn't necessarily easier; my first lathe was one of these*:

              https://store.lathes.co.uk/adverts/for-sale/antique-brown-brothers-lathe

              It's a lathe, it turns, faces and screwcuts, but with no graduated dials, thread-dial indicator, on-off switch(!), etc., it wasn't exactly an ideal beginner's machine. Character-building, you might say.

              * If the link disappears, it's a rather agricultural flat-belt driven machine by Brown Brothers of Great Eastern St., EC, dating from around 1900(?). Mine didn't have the power cross feed, countershaft or most of the other accessories.

              #489879
              duncan webster 1
              Participant
                @duncanwebster1

                Well off topic!

                I can go older than that lathe. When I first worked on R&ER the lathe used for turning wheels was a real relic, it had been donated to the R&E by the GWR in the early 1920s (they had a director in common, Sir Aubrey Brocklebank). It didn't have a cross slide as such, more like a double decker topslide. Not over good for big facing cuts, but OK for wheels.

                When the time came to pension it off it was offered to MOSI and Science Museum but neither would pay for transport so it was weighed in

                Edited By duncan webster on 09/08/2020 20:35:47

                #489884
                IanT
                Participant
                  @iant

                  I think you've just summarised very well why I don't use anything this complicated SoD.

                  I'm not a professional programmer and never will be. These things might suit someone with the right background but I don't have the time to spare. Simple suits me better.

                  smiley

                  Regards,

                  IanT

                  #489912
                  SillyOldDuffer
                  Moderator
                    @sillyoldduffer
                    Posted by Andy Stopford on 09/08/2020 20:24:51:

                    @SOD

                    Atom/PlatformIO seems to work now if upgraded to version 1.49.0. Mine wasn't set up to automatically update and was still on V 1.39. I used the method shown on this page:

                    ,,,

                    Not on my machine! I'm on Ubuntu 20.02 and "sudo snap install atom –classic" installs 1.49.0

                    Atom works as expected and other extensions load correctly – just PlatformIO that crashes. Probably a temporary glitch in the package.

                    I like Atom's clean look and feel, but it's main selling point isn't for me at the moment. It's integrated with git, perhaps the best way of sharing & developing version controlled code in collaboration. But I'm a singleton programmer, occasionally sharing code on a small scale with Forum friends, so github's advantages are wasted on me.

                    General point about choosing tools is understanding they all have advantages and limitations. I find the Arduino IDE well suited to simple 'just me' microcontroller projects, but professionals would likely need more control, especially if they're a team! PlatformIO is in that class. Thanks for mentioning it.

                    Dave

                  Viewing 8 posts - 26 through 33 (of 33 total)
                  • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                  Advert

                  Latest Replies

                  Viewing 25 topics - 1 through 25 (of 25 total)
                  Viewing 25 topics - 1 through 25 (of 25 total)

                  View full reply list.

                  Advert