Arduino CLI For I/O Pin Testing

Need to quickly toggle or read some logic signals without the hassle of writing a quick program? [Thor_x86], aka [Eric], built an Arduino sketch that does just that — and he threw in the ability to send (or receive) serial messages, too. This is a neat idea — kind of a simplified Bus Pirate.

We should warn you that this is an early release, and there are a few minor issues which we are sure [Eric] will iron out soon. We discovered the function strtol() was misspelled in cmd_send.cpp, and there are some configuration #defines which need to be sorted out in file parsePin.cpp, depending on which Arduino module you are running. We got it running on an Arduino Leonardo the quickest, because it has support for Serial1().

Don’t be discouraged by these glitches in this rev 0 deployment — [Eric] has really made quite a nice tool here. Check his GitHub repository for updates (or submit corrections yourself). All in all, it’s a good addition to your digital tool box. On a completely unrelated note, we really like [Eric]’s USB cable with the right-angle micro connector, grungy though it may be.

Besides the standard tools like Bus Pirate, GreatFET, FTDI modules, etc., are there any similar tools you like to use for bit banging and serial testing? Let us know in the comments below.

12 thoughts on “Arduino CLI For I/O Pin Testing

  1. I am eagerly awaiting my Glasgow for high powered interfacing

    I have actually used my mcp2221a breakout from Adafruit with their libraries to use it with CircuitPython on desktop for working with electronic components, it has a few gpio, i2c, spi, uart, and you can use the same super easy CircuitPython code, all their libraries, etc. It’s a really nice gadget, underrated I think, and remarkably cheap: highly recommended. You can even interact with it in a live graphing Jupyter notebook which is impressive.

    1. Another buck50 user! How can that be!? I thought I was the only one.
      Seriously though, there are 10$ logic analyzers in the market, but I simply cannot get myself to move away from buck50. Its clunky, it doesn’t play very well with pulseview. But it works

      1. This in spades! With a Forth on the chip, you can do real programming too.

        While the Forth binaries for the above articles are a bit old in the tooth, they still work just fine. I use them as-is to this day! (One even supports serial over USB.) Check it out:

        And it’s even (mostly) cross-platform too — there’s a Forth for nearly every chip under the sun.

        STM8 eForth is particularly tasty.

        So yeah. Simple Forth on a chip gets you all the interactivity, plus programmability.

        But I like to see hacks like this too, because it shows that people are thinking about getting interactivity into the microcontrollers, which is the first step in the right direction!

        1. I wish you hadn’t mentioned this, Elliot. I’ve been really meaning to dig into Forth but my free time and a good project have just never aligned. The little FT232H-based breakout board I just got in the post yesterday (not unlike the MPC2221a mentioned above) had me thinking Forth again. Grrrr, there goes my weekend.

  2. Why not just install Forth? Then you can test more than just I/O commands, you can also prototype actual algorithms to control IO and then convert them to a sketch.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.