# Arduino/micro-controller thread

**URL:** <https://boards.straightdope.com/t/arduino-micro-controller-thread/727568>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [August 11, 2015, 5:07pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568 "2015-08-11T17:07:49Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [August 24, 2015, 2:36am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/21 "2015-08-24T02:36:04Z")

</div>

> [@Dr.Strangelove](#):
>
> Finally made a video of the semi-finished version of my flipdot project. [Check it out](https://www.youtube.com/watch?v=iq4oHDUIZ_M?vq=hd1080).

Very nice!

As part of my ongoing DIY modular synthesizer project I’m designing an Arduino-based step sequencer. I’m still thinking about how to design the all the outputs I need, which will consist of routing the outputs of 32 different potentiometers to various places. It will probably involve a bunch of multiplexers all controlled by the Arduino.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 2:49am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/22 "2015-08-24T02:49:16Z")

</div>

Thanks, it was a fun project and I think it turned out nicely. The app needs a bit more work but the main features are working well.

> [@friedo](#):
>
> I’m still thinking about how to design the all the outputs I need, which will consist of routing the outputs of 32 different potentiometers to various places. It will probably involve a bunch of multiplexers all controlled by the Arduino.

Are the pots inputs or outputs for the Arduino? If they’re inputs, you can just put them in a square array with the output pins tied together. Needs 12 digital outputs (6x6 array) and a single analog input. No need for a multiplexer.

---

<div class="post-metadata">

**Author:** ![Ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Ale](https://boards.straightdope.com/u/Ale)\
**Post date:** [August 24, 2015, 2:49am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/23 "2015-08-24T02:49:19Z")

</div>

> [@Dr.Strangelove](#):
>
> Finally made a video of the semi-finished version of my flipdot project. [Check it out](https://www.youtube.com/watch?v=iq4oHDUIZ_M?vq=hd1080).
> 
> The display is from [here](http://www.flipdots.com/), and I use an Arduino with Bluetooth serial port to interface with it. My phone ultimately controls it. Some more details [here](http://www.scottcutler.net/projects/flipdots/flipdots.html).

heh, Flippy Dot, nice. 😃

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 24, 2015, 2:49am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/24 "2015-08-24T02:49:33Z")

</div>

> [@Dr.Strangelove](#):
>
> Finally made a video of the semi-finished version of my flipdot project. [Check it out](https://www.youtube.com/watch?v=iq4oHDUIZ_M?vq=hd1080).
> 
> The display is from [here](http://www.flipdots.com/), and I use an Arduino with Bluetooth serial port to interface with it. My phone ultimately controls it. Some more details [here](http://www.scottcutler.net/projects/flipdots/flipdots.html).

That’s pretty cool. I did some software for flip-dot displays a long time ago. They’re not only low energy consumption displays, they also have high visibility.

---

<div class="post-metadata">

**Author:** ![Robot\_Arm](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/robot_arm/32/18280_2.png) [@Robot\_Arm](https://boards.straightdope.com/u/Robot_Arm)\
**Post date:** [August 24, 2015, 3:19am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/25 "2015-08-24T03:19:08Z")

</div>

> [@Dr.Strangelove](#):
>
> Finally made a video of the semi-finished version of my flipdot project. [Check it out](https://www.youtube.com/watch?v=iq4oHDUIZ_M?vq=hd1080).
> 
> The display is from [here](http://www.flipdots.com/), and I use an Arduino with Bluetooth serial port to interface with it. My phone ultimately controls it. Some more details [here](http://www.scottcutler.net/projects/flipdots/flipdots.html).

Very cool. I have the Etch-A-Sketch working pretty well. As a test it draws a circle. There’s just a bit of a hiccup at the top, bottom, or sides where one of the knobs reverses direction. There’s slack within the E-A-S mechanism, so I’m fine tuning how the software deals with it.

In the finest programming tradition, I’ll have it spell “Hello, World!” next.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [August 24, 2015, 4:25am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/26 "2015-08-24T04:25:08Z")

</div>

> [@Dr.Strangelove](#):
>
> Are the pots inputs or outputs for the Arduino? If they’re inputs, you can just put them in a square array with the output pins tied together. Needs 12 digital outputs (6x6 array) and a single analog input. No need for a multiplexer.

The pots control output voltages from the sequencer - since they need to deal with a somewhat bigger voltage range than the Ard’s input levels I am planning on using multiplexers to step through one pot at a time. They also need to range between about -12 to +12v and IIRC the Arduino can’t really deal with negative inputs.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 7:37am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/27 "2015-08-24T07:37:41Z")

</div>

> [@TriPolar](#):
>
> That’s pretty cool. I did some software for flip-dot displays a long time ago. They’re not only low energy consumption displays, they also have high visibility.

Indeed. Like eInk, only better–they have a great contrast ratio, and look just as good in direct sunlight as dim indoor light. Resolution isn’t so hot, but that’s part of the fun.

> [@Ale](#):
>
> heh, Flippy Dot, nice. 😃

I knew I had to implement the game as soon as I came up with the name :).

You might have spotted Pong in the menu–I haven’t implemented that yet, but it’s on my to-do list.

---

<div class="post-metadata">

**Author:** ![Ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Ale](https://boards.straightdope.com/u/Ale)\
**Post date:** [August 24, 2015, 8:01am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/28 "2015-08-24T08:01:32Z")

</div>

> [@Dr.Strangelove](#):
>
> Indeed. Like eInk, only better–they have a great contrast ratio, and look just as good in direct sunlight as dim indoor light. Resolution isn’t so hot, but that’s part of the fun.
> 
> I knew I had to implement the game as soon as I came up with the name :).
> 
> You might have spotted Pong in the menu–I haven’t implemented that yet, but it’s on my to-do list.

Where did you get the, ehmm, flipping thing?  
I just thought of something, how loud can it be? I’m wondering if it could be used as an alarm clock.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 9:05am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/29 "2015-08-24T09:05:21Z")

</div>

> [@Ale](#):
>
> Where did you get the, ehmm, flipping thing?  
> I just thought of something, how loud can it be? I’m wondering if it could be used as an alarm clock.

You want it intentionally noisy :)? It does get pretty loud when all the pixels are going at once. Something along the lines of pouring dry rice into an empty bowl.

I ordered it from [these guys](http://www.flipdots.com/). Not cheap, though. IIRC it was 420 euros. They do have smaller displays, 7x7 and 14x7, for proportionally lower cost.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 9:07am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/30 "2015-08-24T09:07:29Z")

</div>

> [@friedo](#):
>
> The pots control output voltages from the sequencer - since they need to deal with a somewhat bigger voltage range than the Ard’s input levels I am planning on using multiplexers to step through one pot at a time. They also need to range between about -12 to +12v and IIRC the Arduino can’t really deal with negative inputs.

All right; makes sense. If they were just low-voltage inputs you could avoid the multis, but with your setup it sounds like you need them.

> [@Robot\_Arm](#):
>
> In the finest programming tradition, I’ll have it spell “Hello, World!” next.

Excellent! I want to see videos when you’re done.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [August 24, 2015, 11:48am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/31 "2015-08-24T11:48:33Z")

</div>

> [@Dr.Strangelove](#):
>
> All right; makes sense. If they were just low-voltage inputs you could avoid the multis, but with your setup it sounds like you need them.

Also, since it’s technically an analog sequencer, it would be cheating to have the Arduino emit control voltages. 🙂 (But emitting multiplexer logic is OK.)

In olden tymes they built these things entirely out of TTL logic. Really makes you appreciate what microcontrollers can do.

---

<div class="post-metadata">

**Author:** ![CinnamonBabka](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@CinnamonBabka](https://boards.straightdope.com/u/CinnamonBabka)\
**Post date:** [August 24, 2015, 7:00pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/32 "2015-08-24T19:00:48Z")

</div>

> [@Dr.Strangelove](#):
>
> That’s [Saleae](https://www.saleae.com/) :).

Thirding a Saleae. Those things are amazing for the cost.

Any thought to using a Raspberry Pi over an Arduino?

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [August 24, 2015, 7:14pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/33 "2015-08-24T19:14:12Z")

</div>

The R. Pi is basically a tiny single-board computer, complete with OS and a graphics chip and Ethernet port and so on. It has some small overlap with what you might use a microcontroller for, but not a lot. Use a Pi where you would otherwise use a (very small) computer. If you just need to control some external components like ICs, relays, LEDs, etc., use a microcontroller.

---

<div class="post-metadata">

**Author:** ![CinnamonBabka](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@CinnamonBabka](https://boards.straightdope.com/u/CinnamonBabka)\
**Post date:** [August 24, 2015, 7:28pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/34 "2015-08-24T19:28:21Z")

</div>

> [@friedo](#):
>
> The R. Pi is basically a tiny single-board computer, complete with OS and a graphics chip and Ethernet port and so on. It has some small overlap with what you might use a microcontroller for, but not a lot. Use a Pi where you would otherwise use a (very small) computer. If you just need to control some external components like ICs, relays, LEDs, etc., use a microcontroller.

It has all of the overlap you’d want and then some! If the etch-a-sketch were being driven by an RPi you could tie it in with anything that little beast can run. Get a web server running on that thing and you could pull out your phone, type some stuff into a webpage, and watch as your etch-a-sketch draws an incredible ascii penis.

What an age we live it.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [August 24, 2015, 9:10pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/35 "2015-08-24T21:10:57Z")

</div>

> [@Robot\_Arm](#):
>
> Yeah, it was something like that.
> 
> The code builds, the motors turn, I’m going to bed.

> [@CinnamonBabka](#):
>
> … What an age we live it. (sic)

These two quotes aren’t related, but …

**Robot Arm** ’s victory cry and bed-going was at 6:52AM. Despite **Babka** ’s happy assertions about the wonders of this most modern of ages, I’m reminded that some aspects of programming haven’t changed since I was in college in the 70s, nor as a sporadic developer through the 80s, 90s, '00s, and even early '10s.

The more things change, the more they stay the same! 😃

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 9:36pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/36 "2015-08-24T21:36:26Z")

</div>

> [@CinnamonBabka](#):
>
> Any thought to using a Raspberry Pi over an Arduino?

They’re pretty different. I’ll list some advantages of each:

Raspberry Pi:

- It’s a real Linux computer with display, filesystem, LAN, USB, and so on. You can develop right on it.
- Much more powerful than Arduino, especially with floating point math. Lots more memory, too.
- Can run high-level scripting languages like Perl/Python.

Arduino:

- Cheaper.
- Lower power–much more usable for battery-powered devices.
- Faster startup (your program starts running immediately).
- Generally easier to access GPIO pins–you just read/write them directly. This makes “bit banging” (whether to implement extra serial ports or whatever) easier. This has apparently gotten easier on the RasPi in the past few months–I don’t have any experience there yet. It used to be pretty bad.
- Supports analog inputs, and other pin-level features like interrupts.
- Easier to get going with simple projects, like blinking an LED.

I use both in my projects, but mostly Arduino. They’re good enough for the kinds of projects in this thread–driving motors, interfacing with serial devices, etc. RasPi isn’t quite cheap enough for me to consider them “disposable” in the way Arduinos are, so I don’t tend to build them into my projects permanently.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 24, 2015, 9:36pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/37 "2015-08-24T21:36:30Z")

</div>

> [@friedo](#):
>
> The R. Pi is basically a tiny single-board computer, complete with OS and a graphics chip and Ethernet port and so on. It has some small overlap with what you might use a microcontroller for, but not a lot. Use a Pi where you would otherwise use a (very small) computer. If you just need to control some external components like ICs, relays, LEDs, etc., use a microcontroller.

Yes. I’d build a robot with a Raspberry as the brain but still have an Arduino controlling every movable part and laser destruction device.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 24, 2015, 9:46pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/38 "2015-08-24T21:46:46Z")

</div>

> [@LSLGuy](#):
>
> The more things change, the more they stay the same! 😃

Last night, circa 3 am: I find an off-by-1 error in one of my programs. I wrote the code in question like a year ago. “How did this _ever_ work?”

I don’t think you’re a real programmer until you’ve exclaimed those words in the wee hours of the morning.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [August 24, 2015, 10:07pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/39 "2015-08-24T22:07:00Z")

</div>

> [@Dr.Strangelove](#):
>
> Last night, circa 3 am: I find an off-by-1 error in one of my programs. I wrote the code in question like a year ago. “How did this _ever_ work?”
> 
> I don’t think you’re a real programmer until you’ve exclaimed those words in the wee hours of the morning.

It seems I’ve been a “real programmer” for a very long time. You can tell I’ve just been reading the “Age and related horrors” thread.

---

<div class="post-metadata">

**Author:** ![CinnamonBabka](https://avatars.discourse-cdn.com/v4/letter/c/bbce88/32.png) [@CinnamonBabka](https://boards.straightdope.com/u/CinnamonBabka)\
**Post date:** [August 24, 2015, 10:14pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/40 "2015-08-24T22:14:39Z")

</div>

From my several seconds of googling I don’t think the RPi is even $10 more than the Arduino. Toggling the GPIO on an RPi is [simple enough](https://github.com/ams-tech/lkm/blob/master/modules/meters/common/src/meter_phy.c) to do in a kernel module.

Or maybe I’m too much of a Linux nerd now to _not_ preach about it.

[Previous page](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568.md?page=1)

[Next page](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568.md?page=3)
