Blog Posts

RGB Lights for Mykle’s Lightbar

Addressable LEDs before it was cool…

In January 2011, Mykle Hansen put out a call for LED help for his Lightbar event.  I made this 3W LED board:

It’s incredibly bright.

Here it’s set to color pink (#FF20FF).

Mykle wrote more about the lights and using them at Lightbar. This blog entry is mostly about the technical details and design files. Read on for details…

This little project was inspired by Mykle’s Lightbar message on December 2. Well, probably intending to help prior years was a factor. Anyway, here’s that message:

Subject: [dorkbotpdx-blabber] LIGHTBAR cometh … LED help?

hi dorky people!

to any of you who remember LIGHTBAR from two years ago, or heard about it, i’d like to announce that LIGHTBAR 2011 is in the planning stages for this February.

LIGHTBAR is a Seasonal Affective Disorder (SAD) treatment center that appears intermittently in the month of February to bring inspiration, fresh air and wide spectrum light to the people of Portland.

This year I’m working on a Mobile LIGHTBAR system — a folding portable structure. But there’s some tricky parts I’m trying to overcome regarding the light itself.

For one: we’re going to be generator powered at best, so I’m investigating low-power lighting options. LEDs were not really wide-spectrum last time i checked, but maybe they’ve gotten better? Can anybody suggest types of LED lighting wider than the standard white and RGB varieties we’ve had bouncing around since 2005? I’m just not up on the latest LED fashions, I guess.

For two: I’m looking to rent or borrow a portable gas generator during the month of February. I’m asking everybody, yourselves included. I will treat it like a baby.

For three: My Mobile LIGHTBAR will have a folding skin, and I’d really like to integrate some kind of LED lighting system directly in the fabric, or else on some kind of net that easily hangs between the skin and the frame. this would be your standard controlling-a-bunch-of-LEDs project, but it has to be designed for durability, ease of repair, and fairly long runs of cable. If it was all RGB LEDs and they were independently addressable, that would be even better. Probably I’d be talking about something in the range of 100 – 200 LEDs, of 1 watt or less. (roughly!) Picture trying to spread those evenly across a 20′ diameter hemisphere, with the power & control system located somewhere on the edge.

I’ve thought about doing this with the BlinkM units, since they’re bus-addressable, but I feel like with this many units it might be cheaper to have something custom-fabbed. on the other hand, time is tight. i’d be thrilled if i could find system already designed to do exactly this.

and/or, does anybody in Dorkbot feel like taking this on as their own project? i think i could find some budget …

-m-

So, I started looking at some RGB LED specs. I pretty quickly found that the lower power LEDs, like the one on BlinkM, aren’t specified in Lumens (total light output), or if they are, the Lumens per Watt aren’t great.

After comparing lots of LEDs, I finally ended up with ASMT-MT00, which is in the 30-some Lumen/Watt range. It’s not cheap (about $10 to $15 in small qty), but it really works!

Here’s a close-up of the LED.

Today many more high power LEDs are available, some from Chinese sellers with questionable specs, but so cheap they’re hard to pass up!  Back in 2011, this seemed like the best option.

Mykle wanted to keep the cost low. In fact, he wanted to use cheaper LEDs… But this was my little weekend project-on-a-whim, and I wanted 100+ lumens! I also really wanted to make it run on 12 volts and have very efficient conversion and tolerate some voltage drop without changing the LED brightness, and I wanted RS485 communication so the signals can run a long distance (unlike BlinkM). This design does all that. In the end, it worked really well for Lightbar… so well that Mykle is building 18 more boards!

Pretty much on a whim, I ordered a few ASMT-MT00’s and other parts, and came up with a somewhat unconventional design.

IC manufacturers generally recommend using 3 of their LED drivers for RGB LEDs, one for each color. Of course, they love to sell 3 specialized chips, which aren’t cheap! Instead, I decided to try using only 1 special power supply chip, and the LM3407 from National Semiconductor looked like one of the most economical (cheapest) choices. And I was going to use only 1 instead of 3.

The basic idea was run all 3 LEDs in series. The ASMT-MT00 nicely provides each LED separately on 6 pins, instead of common anode or common cathode, which makes this possible.

The LM3407 can operate without any output capacitor. It is a constant current afterall. Normally a 22 uH inductor would be recommended. But I decided to increase it to 100 uH (the datasheet is light on details of stability in continuous vs discontinuous mode, but it seemed like continuous conduction buck mode would work). The LM3407 datasheet mentions being able to omit the output cap, with increased variance in output. Since I wasn’t going to have any output cap, I wanted the current to be better regulated, and upsizing the inductance is the way to do it.

The reason to omit the output capacitor is because I decided to change the color by diverting the current around each LED. Red is about 2 volts, and blue and green about about 3.5 volts. But when shorted by a PNP transistor, the voltage suddenly changes to about 0.5 volts. Better transistors would be less than 0.5, but I used cheap 2907’s.

Since the PNP transistors basically “float” at whatever voltage the power supply and drop on other LEDs or transistors happen to make, I used 3904 NPNs so a microcontroller can turn on and off their base current. When the processor drives 3.3 volts, about 2.6 volts is driven onto the 220 ohm resistor on the emitter, or about 12 mA in the 220 ohm resistor. That 12 mA comes mostly through the collector (which doesn’t care what it’s voltage happens to be when used in linear mode), which pulls the current from the floating PNP transistor base.

Yes, this is a pretty unusual transistor circuit… and I wasn’t completely sure if it’d work, but this whole thing was just a whim. I spend 2 days on it, the first one reading about the LEDs, LM3407 (and lots of other chips), and thinking about that circuit. The second day, I drew up the circuit board. I knew the LED gets hot, and so would the LM3407 and maybe the transistors too? I just drew some copper planes and thermal vias, and a big pad for a small heatsink (leftover from another old project). No prototype, no simulation, no real analysis… just a lot of guesswork and hunches, and at the end of the second day I sent off the files to Laen’s PCB Order (which is now OSH Park).

Here are the PCB files.

I never drew any schematic for the rest, but it’s just a ATTINY2313 chip to control everything. There’s 4 PWM signals, 3 connected to the transistors, and the 4th to the “DIM” control pin on the LM3407, so it can shut off when none of the LEDs need to be on. There’s also a RS485 interface chip and a few other necessary parts, but nothing really special.

Here is a full parts list:

qty  part number        part description                        sources
---  -----------        ----------------                        -------
1  ASMT-MT00-00001      RGB LED, 3W                             mouser, digikey
1  LM3407MYCT-ND        LED driver chip, 350 mA                 digikey
1  ADM3493ARZ-ND        RS485 chip, 3V                          digikey
1  556-ATTINY2313V10SU  ATTINY2313, SOIC-20 ("20SU" is ok)      mouser, digikey, avnet
1  296-26120-ND         LP2950 3.3V TO-92                       digikey
3                       MMBT3904, NPN transistor                digikey
3  771-PMST2907A115     PMST2907A, PNP transistor               digikey
1  B130-FDICT-ND        Diode, Schottky, B130, SMA              digikey
1  445-1208-1-ND        Inductor, 100 uH, 500 mA, 7mm           digikey
1  535-10211-1-ND       Crystal, 7.3728 MHz                     digikey
2                       Capacitor, 33pF, 603                    digikey
3                       Capacitor, 1uF, 16V, X7R, 603           digikey
1  490-5523-1-ND        Capacitor, 10uF, 25V, X5R, 805          digikey
1  311-.56SCT-ND        Resistor, 0.56, 1%, 805                 digikey (have 47 more)
2                       Resistor, 47K, 603                      digikey
3                       Resistor, 220, 603                      digikey
2                       Terminal block, 4 pin
1                       Header, 3x2, 0.1 inch (AVR prog)        (cut from 20x2 strip)
1  532-507302B00        Heatsink                                mouser
1                       Screw, 4-40, 1/4 inch
1                       Nut, 4-40
1                       Lock Washer, #4
1                       PCB                                     dorkbot

If anyone actually builds more boards (Mykle is building 18 more), here’s a parts placement diagram:

I pretty much set this thing aside and forgot about it, until the boards arrived a few weeks later. I set them aside for a few days, but the Dorkbot Monday meetup was the motivation I needed to get them actually working!

Then I spent one late night session Sunday night building and testing the hardware. Amazingly, the LM3407 chip worked great. I was worried the current regulation might respond too slowly when the output voltage suddenly changes by 3 or 6 or 8 volts! But it works great (at least without any output capacitor). It is designed by be PWM controlled by the DIM pin… but there weren’t any specs about how it’d respond to the ‘LED voltage” suddenly changing. I actually spent a couple hours with an oscilloscope and waveforms driving onto the transistors to make sure it really worked.

The other thing I tested and verified, is the switching power supply really does efficiently convert the power and adjust as the color changes. Even though the current is still “on”, when 2 of the lights are off, the voltage is only 0.5 volts (the cheap 2907 can’t get it any lower). Because power is voltage * current, the input current really does go down even though the output current stays the same, because the output voltage changed, and the switcher is pretty efficient. It really does work well that way. The switcher also does a great job of making exactly the same output, even if the input drops to 10 volts instead of 12.

About mid-morning Monday, with the Dorkbot meetup looming only hours away, but the hardware pretty well tested, I started working on the software side.

One confession I need to make is the ISP header was routed for the usual pinout with the header on the “top” side, but I soldered it to the “bottom” side (the side with the heatsink). Fortunately, I had a Teensy with ArduinoISP sitting on my desk, so it was pretty easy to just reverse the pinout to match. But if anyone else builds this little board and tries to use an off-the-shelf AVR ISP programmer, well, either solder the header to the LED side, or plan on wiring up a little adaptor to reverse the pinout.

In about an hour, I banged out this extremely simple code to run on the ATTINY2313 chip.

It listens for 8 character ASCII commands at 115200 baud. The input is hex, where the first byte is the board’s address, and the next 3 bytes are the RGB color. Any non-hex byte causes it to discard any data and begin listening for a new comment. Normally, sending a byte like “:” before a command, or pressing Enter after each command is a good idea. Here’s a few commands:

01FFFFFF Board #1, White
030000FF Board #3, Blue
02000000 Board #2, Off

Each board needs to have its address hard-coded. The makefile runs AVRDUDE automatically, so this isn’t very difficult.

Mykle has already added some new features to the code, like a broadcast address. I don’t have his latest code, but he’s planning to set up a CVS (or similar) server for the code. Hopefully he’ll post a reply below with a link.

The code could do a lot of things. The address bytes could be stored in EEPROM, instead of hard-coded. The protocol could be extended, or features like BlinkM could be added. Even DMX should, in theory, be possible.

I spent about 1 hour on the code. Much of that was making the PWM polarities correct.

With a few extra hours to spare before Dorkbot that Monday evening, I did some fiddling to make the lights work with Puredata. All 3 boards I made were working well that night.

I must confess, I’m not very experienced with Puredata. But quite a Dorkbot regulars are. Jason, Brian and others hacked on the Pd stuff and made the LEDs blink and fade. Here’s the Puredata Code, both my original attempts, and the end result of hacking on the code during 1 evening at Backspace.

The evening, Mykle took home the 3 boards, and a RS-485 converter I had (left over from other projects). They were used at Lightbar, and I made it out there one of the evenings. Good times.

Mykle is building 18 more lights, and plans to do fun things with the software.

I’m not planning to do much more with this, but I wanted to get this blog post written, so the info, and all the available design files and code would be posted publically. If you, dear reader, build these or use the ideas or info for another project, please post a comment below.

Enjoy!

 

This article was originally published on the DorkbotPDX website, on March 22, 2013.  In late 2018, DorkbotPDX removed its blog section.  An archive of the original article is still available on the Internet Archive.  I am republishing this article here, in the hope it may continue to be found.  But today, many awesome addressable LED products exist on the market, so this sort of project probably doesn’t make good economic sense compared to just buying a ready-made LED strip.

Venti-POV – LED Poi

Po Ting made some awesome LED-POV poi that has some really impressive image rendering.

This design includes 80 pixels and a touch-sense pad to act a control button.  It takes advantage of the high performance features of the Teensy 3.6 to achieve high frame rate that allows for really detailed images as the LEDs move.

A couple of years before this project, Po Ting didn’t have any experience with Arduino or using micro controllers.  Through trial and error as well as a lot of community support, he was able to create this incredible LED project.  Some of the projects and libraries that really helped on the journey were Mortonkopf’s POV Project, the FastLED library,  KurtE’s DMA-SPI library, and Duff’s Snooze Library.

Stormtrooper Voice Changer

Shawn Hymel over at SparkFun put together a compact Stormtrooper Voice Changer.

While there are some pre-built voice changers out there for defenders of the Empire, this solution is both compact and low cost.  With only a handful of parts – a Teensy 3.2, Prop Shield Board, small speakers, a microphone, and a battery – this solution can fit entirely in a helmet.

This project makes use of the Audio Design Tool as well as TeensyTransfer by FrankB.

Detailed instructions (and code) on how to up your cosplay game by sounding like a Storm (or Clone) trooper can be found on this SparkFun blog page.

May the Force be with you.

 

Soft Power Button

Christoph put together a soft power button with sense output to power up a Teensy and allow the application to turn itself off the power when necessary.

The project started with list of desired features including: one button to enable power to a circuit, keep the power on as needed, sense the output so that the microcontroller can sense the power button’s state and turn itself off when told to do so, use a single LiFePO4 battery, and use no specialized parts.  Christoph was able to make this happen using a Teensy 3.6, a 5V step up/down regulator, a PCB he designed for the pushbutton, and a few passive parts.

Code for the project can be found on this Hackaday.io project page.

 

Arduino Music Player

Jarkko Lempiainen has improved his Arduino Music Player to play MOD, S3M, XM, and IT music files

Originally built on a Teensy 3.1, the player has been upgraded to a Teensy 3.6 to take advantage of improved performance and increased memory.  It features 8 channels that can be individually controllers and supports various effects such as vibrato and arpeggio.

Code for the project is available on GitHub.

Arduino Pluggable Discovery

Arduino 1.8.9 has a new Pluggable Discovery feature, which began as a contribution from Teensy.  Ports can now be customized to support any protocol.

Already Omlzo is using Pluggable Discovery with CAN bus.

In this article, I’ll dive into the details needed to use Pluggable Discovery.  But first…

A Brief History

Since the first Arduino software in 2005, the main way to upload code to boards has been by serial ports.  In 2008, support for in-circuit programmer hardware was added, where you select a type of programmer  rather than a port.  In 2013, port detection and selection in the Ports menu was expanded to include network ports for Arduino Yun.  Around that time, Arduino also became highly configurable by recipes in platform.txt, based on a major contribution from Mark Sproul & Rick Anderson.   But until now, Arduino has supported detecting only 2 types of ports, either serial or network (using Yun’s specific protocol), with the only way to customize being dedicated programmer hardware.  Protocols other than serial & Yun’s network just weren’t supported for the Ports menu.

Teensy has used HID protocol, not Serial, for code uploading since its launch in 2008.  Using Teensy with Arduino was somewhat awkward.  When running a program implementing USB Serial, Teensy would appear in Arduino’s list of serial ports.  But with HID or other non-serial protocols, no port would be shown.  Teensyduino’s upload process could automatically detect Teensy in those modes, so uploading would “just work” even though the ports menu indicated no ports available.  When things went wrong, like this infamous Windows 7 driver bug, lack of reliable ports display made confusing situations hard to understand.

In early 2017, I started work to improve how Teensyduino integrates with Arduino.  A dedicated “teensy_ports” utility watches for Teensy’s USB devices to be added & removed.  Inside the Arduino IDE, I added a 3rd type of port to the DiscoveryManager class, using this utility’s info.  Finally, Teensy could be seen in the Ports menu even with running in a non-Serial mode.  You could choose exactly which board to use for upload, rather than hoping the automatic detection would find the right one.

In a June 2018 conversation with Massimo Banzi, Cristian Maglie and other Arduino developers, it was decided that I would contribute this code to Arduino.  A flexible JSON format would replace the original single-line text, so anyone could use it, and Arduino can adapt the format in the future.  After a lengthy process, where Cristian rewrote and greatly improved the JSON parsing, in March 2019 Arduino 1.8.9 was finally released with this new “Pluggable Discovery” feature.

JSON Data Format

The first step to using Pluggable Discovery is to write a “discoverer” utility which sends information to the Arduino IDE as your board is connected and disconnected.  Data is sent to Arduino on stdout, and Arduino may send you commands on stdin.

Here is a sample of the JSON data “teensy_ports” sends to Arduino 1.8.9 when running on Linux.

{
  "eventType": "add",
  "port": {
    "address": "/sys/devices/pci0000:00/0000:00:14.0/usb4/4-14/4-14.1/4-14.1.4",
    "protocol": "Teensy",
    "protocolLabel": "Teensy Ports",
    "boardName": "Teensy 3.6",
    "label": "/dev/hidraw5 Audio",
    "identificationPrefs": {
    },
    "prefs": {
      "vendorId": "16C0",
      "productId": "04D2",
      "serialNumber": "0"
    },
    "online": "true"
  }
}

Here is a quick attempt to document these fields.  Please understand these fields may change meaning, or others may be added by future Arduino releases.  Hopefully in the future Arduino will add official documentation for this JSON format.

  • eventType: Either “add” when a device is detected and Arduino should begin showing it in the Ports menu, or “remove” when disconnected and the Ports menu should no longer show it.  If information changes, or more information becomes available, multiple “add” messages may be sent to cause Arduino to update the Ports menu.  The eventType “error” is also supported.  See Discoverer Commands below for details.
  • port: A container for all of the information about the port.
  • address: A unique identifier for this port.  The address is not shows in the Ports menu, but does appear in the status bar on the bottom of the Arduino IDE windows when the port has been selected.  The address is the primary info you would give to your uploader utility.  See “Integrating With Your Uploader” below for details.
  • protocol: A unique (or at least distinctive) name for the communication protocol the port uses.  Currently Arduino 1.8.9 ignores this field, unless it is “serial” or “network”.  This name can be passed to your uploader utility.
  • protocolLabel: The name of your type of port, as shown in the title of a sub-section of the Ports menu.  Currently there is no way to adapt this field to different languages.  This info can also be passed to your uploader utility, though typically the “protocol” field would be used rather than this name meant for display to the user.
  • boardName: The name of the board.  This should probably match one of the names you define in boards.txt, though Arduino 1.8.9 does not currently enforce any requirements.
  • label: The human readable name for the port, to be shown as a selectable item in the Ports menu.
  • identificationPrefs: Arduino 1.8.9 does not make any use of this field.
  • prefs: This is meant to collect info about the port, such as the info shown by “Get Board Info”.  However, Arduino 1.8.9 does not make use of this field for non-serial ports.  Hopefully future versions will fix this.
  • online: While not used by Arduino 1.8.9 for non-serial ports, this should normally be “true” when eventType is “add” and “false” when eventType is “remove”.  With serial ports, the port’s online status can be momentarily false when Arduino is attempting to send a command to the board to automatically reboot into its uploading or bootloader mode.

When a port should be deleted, only the eventType and address fields are required.  Here is a sample of the JSON remove message teensy_ports transmits.

{
  "eventType": "remove",
  "port": {
    "address": "/sys/devices/pci0000:00/0000:00:14.0/usb4/4-14/4-14.1/4-14.1.4",
    "online": "false"
  }
}

Like all programs which print to stdout, buffering may exist between your output and Arduino’s reception.  Composing the entire JSON message in a buffer, then using a single write and flush to stdout is the most efficient way.  Arduino is using the Jackson library to parse your JSON messages, so sending piecemeal, with or without newlines or other optional white space should also work.

Discoverer Commands

The Arduino IDE will also send your discoverer commands on its stdin stream.  These are not JSON.  They are plain text commands, terminated by a single newline character.

  • START_SYNC – Begin running in sync mode, where your program transmits JSON messages automatically as the device change events occur.
  • START – Begin running in polled mode, where Arduino will send a “LIST” command at regular intervals.
  • LIST – In polled mode, this command is meant to prompt your program to scan for changes.
  • STOP – Stop running.

Future versions of Arduino may behave differently, so please understand the following behavior is specific to version 1.8.9.

When Arduino runs your discoverer, it will send a single START_SYNC command.  If you do not need polled mode, no response is needed or expected.  Your program simply transmits JSON messages as it detects ports, starting with “add” eventType messages all the ports currently available, and then more “add” or “remove” messages as available ports change.

If you require polling mode, you would transmit this JSON message.

{
  "eventType": "error",
  "message": "START_SYNC not supported"
}

Upon receiving this message, Arduino should transmit “START” and then send “LIST” at regular intervals.  If your discoverer is unable to detect hardware changes as they occur, you can design your code to wait for “LIST” and then check whether ports have changed.

With polling, typically you would need to design your discoverer to keep in memory a list of the ports it has previously transmitted to Arduino.  When you poll which ports are actually available, your discoverer is responsible for detecting when any port you have previously transmitted an “add” eventType is no longer present.  You must transmit the “remove” eventType, to cause the Arduino IDE to no longer offer that port to users in the Ports menu.

A list of previously detected ports can also help you avoid repeatedly sending the same info as your discoverer checks which ports currently exist.  But this is not required.  As long as the “address” field remains the same, Arduino Pluggable Discovery treats a redundant “add” eventType as a request to update the port’s info.  Sending the same info repeatedly is inefficient, but harmless.

Polling mode may not be working properly in Arduino 1.8.9.  Most testing was done with sync mode.

Arduino 1.8.9 transmits STOP only when the user closes the entire IDE, just before your program is terminated.  There is no guarantee your discoverer will continue running long enough to actually receive the STOP message.

Future Arduino software may send START_SYNC, START and STOP at different times, but with 1.8.9 the start messages are used only as the Arduino IDE starts up, and STOP is sent only when the user quits the software.

Running Your Discoverer

Like everything else customizable in modern Arduino, you create a recipe in your platform.txt file which tells Arduino to run you discoverer.  Here is a recipe for “teensy_ports”.

## Teensy Ports Discovery (Arduino 1.8.9)
discovery.teensy.pattern="{runtime.ide.path}/hardware/tools/teensy_ports" -J2

This recipe assumes the teensy_ports utility is installed in the hardware folder, inside the Arduino software.  Because the recipe starts with “discovery”, Arduino 1.8.9 detects it is a command for a pluggable discovery program.  It will be run as Arduino starts up.  Use of {runtime.ide.path} only works if your discover is copied to a locating inside Arduino’s folder.

The “-J2” is parameter given to “teensy_ports”, the same as if you had typed “./teensy_ports -J2” on the command line.  While unlikely to be needed, you can build almost any command line your discoverer might need.  In this case, the JSON format changed during development, so “-J2” tells teensy_ports with JSON dialect to output.

If your board is installed by Arduino’s Boards Manager, your discover is meant to be defined and installed as a tool and referenced with {runtime.tools.TOOLNAME.path}.  See this comment from Cristian for more detail.

Integrating With Your Uploader

Now that your discover can find your board’s custom port, and the user can select it in the Ports menu, you need a way to actually pass the detected info to your board’s uploader program.

Fortunately this part is easy.  The macro {serial.port} in your uploader recipe in platform.txt will be replaced by whatever text your discoverer provided in the JSON “address” field.

tools.yourtoolname.upload.pattern="{runtime.hardware.path}/upload_program_name" "{build.path}/{build.project_name}" "{serial.port}"

Yes, it’s still called “serial.port” in these substitution patterns, even though we can now (theoretically) extend the Arduino IDE any sort of protocol.

While your uploader probably only needs the unique address field and the pathname to find the code Arduino compiled, you can also pass some of the other JSON fields to your uploader.  Here is the recipe Teensy is currently using.

tools.teensyloader.upload.pattern="{cmd.path}/teensy_post_compile" "-file={build.project_name}" "-path={build.path}" "-tools={cmd.path}" "-board={build.board}" -reboot "-port={serial.port}" "-portlabel={serial.port.label}" "-portprotocol={serial.port.protocol}"

Hopefully Arduino will eventually document the mapping from JSON fields to recipe substitution names.  These were found by reading the Java source code and some experimentation.

Troubleshooting

What could possibly go wrong?!

Arduino 1.8.9 has a fair amount of debugging code built in to help you see how Arduino is running your discoverer, and what it’s receiving.  To enable the debug output, add this line to your preferences.txt file.

discovery.debug=true

If you’re not sure where your preferences.txt file is located, click File > Preferences and look at the info in the button part of the Preferences dialog.

Minor Issues In Arduino 1.8.9

Polling mode may not work.

The substitution macro {runtime.hardware.path} very often used in platform.txt recipes is not yet supported.  Teensyduino adds a patch to Arduino 1.8.9 to support this in discovery recipes.  If you prefer {runtime.hardware.path}, installing Teensyduino may be a short-term solution.  Hopefully this patch will be merged into future Arduino versions.

Other substitution issues may exist in Arduino 1.8.9.  Pluggable discovery is brand new.

Pluggable Discovery does not yet exist in Arduino’s Command Line Interface software.  Using Pluggable Discovery today means your board’s package can not work with the CLI.  Cristian started work on Pluggable Discovery for CLI months ago, but since January there appears to be no progress.  Hopefully as more people use Pluggable Discovery to support non-Serial protocols, we’ll see progress on bringing it to CLI as well.

Serial Monitor

Of course the other key Arduino IDE feature missing to truly support boards with any type of port is the serial monitor window.  And also the serial plotter.

Teensyduino currently adds several patches to the Arduino IDE to install a customized serial monitor.  It communicates, via stdin/stdout/stderr with a “teensy_serialmon” utility program.  Hopefully in the future, these patches can eventually be contributed to Arduino as as “Pluggable Serial Monitor” feature which complements Pluggable Discovery.

But at least for now, if you are interested in extending the Arduino IDE to work with boards using completely different communication protocols, hopefully the Pluggable Discovery contribution and this article can help.

 

 

 

 

IR PC Remote & YouTube Controller

Shawn McCombs added IR remote capabilities to his laptop so that he could control his YouTube playlist from the comfort of his bed.

Some older laptops don’t have IR sensors or remote control capability, but Shawn worked around that by using a Teensy, and IR sensor, and the IRremote library.  This project allows you to take a remote and reprogram the buttons to control your laptop.

Code for the project is posted on GitHub.

Portable 2 Player Arcade Console

Lili Bykerk made a pretty cool portable 2 player arcade console.

This controller uses a Raspberry Pi running RetroPi to run the game ROMs and a Teensy 3.2 to act as a game controller using a modified version of the USB Joystick code. The controller also features an HMDI port to plug into your TV as well as 2 USB ports in case you want to plug in your own arcade controller rather than use the 2 that are built-in.

Lili put together a great Instructable on the project that details how to build your own and also provide the code for the project.

 

Counter Strike Global Offensive with Wii Nunchucks

Dave retrofitted a couple of Wii Nunchuks into custom controllers for Counter-Strike: Global Offensive (CS:GO).

Dave was already working on a project using two Wii Nunchuks for a custom controller when he came across a Reddit post about using a Wii Nunchuck to aim when playing CS:GO.  He had a breadboard on his desk with a Teensy-LC, some Nintendo Extension CTRL (NXC) breakout boards he developed, and some Wii Nunchuks wired up.  After a bit of programming he was up and running playing CS:GO with his new controllers.

Additional details and code for the project can be found Dave’s Parts Not Included site.