# 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:** 1

<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 11, 2015, 5:07pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/1 "2015-08-11T17:07:49Z")

</div>

[This Pit thread](http://boards.straightdope.com/sdmb/showthread.php?t=764326) goes into some stuff that is frustrating **Robot Arm** ’s attempt to make an NC Etch-a-Sketch. If other Dopers have an interest in this area I’d like to hear from them.

As I mention at the end of that thread I ordered a basic Arduino kit and I’d like to play around. Since my electronics bench is severely depleted of tools and parts I’ll probably start by making some kind of high functioning logic probe. I’d like it to measure voltage in addition to simple high-low indicators, and it should have an audio output because I love listening to capacitors discharge. A small display should have enough resolution to distinguish the waveform. It would be nice to have it measure resistance and current also.

Some of my plans (spoilered to conserve screen space on viewing):

I’m thinking about making a scope with it too. That would need a higher resolution display, something that could XY plot from analog inputs. In the old days I would have used my oscilloscope display to do something like that 🙂 I think the solution now is to send the data back to the big computer for display.

**Dr. Strangelove** pointed out some low cost basic controllers that got me interested in an old idea. Putting together motion control machinery used to be a heavy duty task, matching up a lot of incompatible controllers, motors, and logic. I would have loved to have plug-and-play type components to work with. Like a rotary actuator that you just send commands to, like number of revolutions or degrees and a time component. Or linear actuators that just took a distance and time to move. And all of them could be sent messages to set the scale. So for these days each one would have a USB port and get chained together to be controlled from a single computer.

Anyway, there are some things like that out there now, but they’re expensive to be playing with. Some simple and inexpensive ways to do to this might move be along on my plan to start the robot rebellion.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [August 11, 2015, 5:13pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/2 "2015-08-11T17:13:58Z")

</div>

This might be a decent learning experience, but it certainly isn’t cost-effective.  
I’d concentrate on making a device that you can’t buy off-th shelf, and buying a Saelea instead.

I don’t think that the Arduino is going to be fast enough to make a decent logic probe or scope:

---

<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 11, 2015, 5:31pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/3 "2015-08-11T17:31:49Z")

</div>

I think it will do to get started. If I need a scope or logic analyzer I’ll get one, but at the moment I’m just playing, and there’s the fun of doing it yourself. I want to see how readily these things can communicate through USB. Right now Arduino sounds very basic, from a reset you just kick off a simplistic loop. There are Arduinos with heftier CPUs and the Raspberry Pi out there also. So right now it’s a learning experience.

---

<div class="post-metadata">

**Author:** ![JackaRoe](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@JackaRoe](https://boards.straightdope.com/u/JackaRoe)\
**Post date:** [August 12, 2015, 1:05pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/4 "2015-08-12T13:05:47Z")

</div>

Take a look at these links, first is a logic Analyzer and the second a scope.

[http://www.instructables.com/id/Arduinolyzerjs-Turn-your-Arduino-into-a-Logic-Anal/?ALLSTEPS](http://www.instructables.com/id/Arduinolyzerjs-Turn-your-Arduino-into-a-Logic-Anal/?ALLSTEPS)

> **[Wireless Arduino Oscilloscope](https://www.instructables.com/Wireless-Arduino-Oscilloscope/)**
>
> Wireless Arduino Oscilloscope: In this guide I will explain how to use a Windows 8.1 phone, Arduino Uno board, and HC-05 Bluetooth module to build a wireless oscilloscope. The phone application has the critical functions of an oscilloscope, although...

---

<div class="post-metadata">

**Author:** ![steronz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/steronz/32/11765_2.png) [@steronz](https://boards.straightdope.com/u/steronz)\
**Post date:** [August 12, 2015, 1:17pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/5 "2015-08-12T13:17:46Z")

</div>

I bought one earlier this summer as a craft to do with my kids, and have sadly not been able to devote much time to it. Plans (in no certain order) are to make a Simon type game, and to use a hall sensor to make a bicycle speedometer.

---

<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 12, 2015, 3:06pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/6 "2015-08-12T15:06:42Z")

</div>

I looked at a couple of Instructables for the Arduino. I’ll probably have a simple logic probe working in no time, giggle to myself while I use it on the Arduino board itself, and then hopefully I’ll find time do something else with it. Based on previous posts Robot Arm’s been working on his Etch-a-Sketch for a while, finding time for these things isn’t always easy.

One thing I may do is make a home hematocrit tester that I need. I’ll use a stepper motor as the centrifuge and work up something to compute the level from the length of the red section of the capillary tube. Pretty simple functionality, but I’ll feel so proud of myself for making it.

---

<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 12, 2015, 5:11pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/7 "2015-08-12T17:11:07Z")

</div>

One project I’ve been procrastinating about is a small motorized programmable tripod head to take time lapse photos with a GoPro camera, the idea would be to have a small stepper motor panning the camera slowly as it takes photos over several minutes or hours.  
It should be very simple to do, the mechanics would be 3D printed, but I haven’t had the time and other projects have gotten on the way.

---

<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 12, 2015, 11:07pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/8 "2015-08-12T23:07:53Z")

</div>

> [@Ale](#):
>
> One project I’ve been procrastinating about is a small motorized programmable tripod head to take time lapse photos with a GoPro camera, the idea would be to have a small stepper motor panning the camera slowly as it takes photos over several minutes or hours.  
> It should be very simple to do, the mechanics would be 3D printed, but I haven’t had the time and other projects have gotten on the way.

This sounds like what the Arduino is made for. Simple, one off. Besides a stepper motor and a couple of screw adapters what mechanics do you need?

---

<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 12, 2015, 11:46pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/9 "2015-08-12T23:46:36Z")

</div>

> [@TriPolar](#):
>
> This sounds like what the Arduino is made for. Simple, one off. Besides a stepper motor and a couple of screw adapters what mechanics do you need?

I would 3D print the thing, maybe use a timing belt to increase the torque or just gears from an R/C helicopter for the same purpose.  
Some years ago I built a computer controlled motorized panoramic tripod head for a DSLR camera and I used modified servo motors with a pinion gear attached to the output shaft driving a largish main rotor gear from an electric helicopter, it was enough to swing around a couple kilos worth of camera and lens.

---

<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 14, 2015, 7:05am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/10 "2015-08-14T07:05:51Z")

</div>

> [@TriPolar](#):
>
> [This Pit thread](http://boards.straightdope.com/sdmb/showthread.php?t=764326) goes into some stuff that is frustrating **Robot Arm** ’s attempt to make an NC Etch-a-Sketch. If other Dopers have an interest in this area I’d like to hear from them.

Well, it took a little doing but I managed to clean up the damage inflicted by the various IDEs I tried using. I think.

So, I’ve got my drawing code separated into a class in a .h and a .cpp file. The only real way I’ve found to track what’s going on is to put in some code to output statements to the serial connection, and the Arduino editor can open a window that monitors that connection. That was helpful when I was getting the original version of the app to run. Once it’s running correctly, I can comment those statements out or even delete them. I’ve changed some of the logic in the new class, so I’m relying on that output again to see if the code is behaving the way it should.

Wow! Calls to the serial port are changing the values of variables. With the latest change, the whole flow of the program is different. As it runs now, a function call to print a text string to the serial port is outputting only some of the text, then the program returns to the beginning of the function containing that statement, and loops. According to the messages when I upload the sketch to the board, I shouldn’t be anywhere near the memory limits for code or variables.

I’ve dealt with weird bugs before, but I don’t know what the fuck is going on with this.

---

<div class="post-metadata">

**Author:** ![jz78817](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jz78817/32/1028_2.png) [@jz78817](https://boards.straightdope.com/u/jz78817)\
**Post date:** [August 14, 2015, 10:40am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/11 "2015-08-14T10:40:54Z")

</div>

we gutted a gas station LED price sign and turned it into a countdown clock for R/C boat racing.

probably one of the simpler Arduino projects ;)

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [August 14, 2015, 2:37pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/12 "2015-08-14T14:37:28Z")

</div>

> [@Robot\_Arm](#):
>
> Well, it took a little doing but I managed to clean up the damage inflicted by the various IDEs I tried using. I think.
> 
> So, I’ve got my drawing code separated into a class in a .h and a .cpp file. The only real way I’ve found to track what’s going on is to put in some code to output statements to the serial connection, and the Arduino editor can open a window that monitors that connection. That was helpful when I was getting the original version of the app to run. Once it’s running correctly, I can comment those statements out or even delete them. I’ve changed some of the logic in the new class, so I’m relying on that output again to see if the code is behaving the way it should.
> 
> Wow! Calls to the serial port are changing the values of variables. With the latest change, the whole flow of the program is different. As it runs now, a function call to print a text string to the serial port is outputting only some of the text, then the program returns to the beginning of the function containing that statement, and loops. According to the messages when I upload the sketch to the board, I shouldn’t be anywhere near the memory limits for code or variables.
> 
> I’ve dealt with weird bugs before, but I don’t know what the fuck is going on with this.

Watch your stack!

I don’t use Arduino, but in my experience stack-related bugs are very common when using high-level languages with micros.

---

<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 14, 2015, 2:49pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/13 "2015-08-14T14:49:00Z")

</div>

> [@beowulff](#):
>
> Watch your stack!
> 
> I don’t use Arduino, but in my experience stack-related bugs are very common when using high-level languages with micros.

Just going to mention that. The symptoms sound like memory getting over-written. This is bringing back memories of ye olden days trying to cram code and data into 1K of memory, or less.

---

<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 16, 2015, 10:52am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/14 "2015-08-16T10:52:18Z")

</div>

> [@beowulff](#):
>
> Watch your stack!
> 
> I don’t use Arduino, but in my experience stack-related bugs are very common when using high-level languages with micros.

> [@TriPolar](#):
>
> Just going to mention that. The symptoms sound like memory getting over-written. This is bringing back memories of ye olden days trying to cram code and data into 1K of memory, or less.

Yeah, it was something like that.

The code builds, the motors turn, I’m going to bed.

---

<div class="post-metadata">

**Author:** ![Ruken](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@Ruken](https://boards.straightdope.com/u/Ruken)\
**Post date:** [August 16, 2015, 12:11pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/15 "2015-08-16T12:11:48Z")

</div>

> [@TriPolar](#):
>
> If other Dopers have an interest in this area I’d like to hear from them.

I toy with making some greenhouse controllers. There are already commercial solutions, but I think it would be fun.

Difficulty: My only programming experience is a class that taught me rudimentary C over 10 years ago. And I’ve never soldered anything. But sometimes learning by doing is the way to do it.

---

<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 16, 2015, 6:53pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/16 "2015-08-16T18:53:38Z")

</div>

> [@beowulff](#):
>
> I’d concentrate on making a device that you can’t buy off-th shelf, and buying a Saelea instead.

That’s [Saleae](https://www.saleae.com/) :).

One thing you should never do is buy a [Chinese knockoff](http://www.aliexpress.com/item/New-Arrivals-Saleae-Usb-Logic-Analyzer-24m-8ch-Compatible-to-Saleae-Can-Monitor-8-Different-Digital/32432732287.html) of the Saleae Logic device. It would be super unfair to the real developers.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [August 16, 2015, 8:25pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/17 "2015-08-16T20:25:01Z")

</div>

> [@Dr.Strangelove](#):
>
> That’s [Saleae](https://www.saleae.com/) :).
> 
> One thing you should never do is buy a [Chinese knockoff](http://www.aliexpress.com/item/New-Arrivals-Saleae-Usb-Logic-Analyzer-24m-8ch-Compatible-to-Saleae-Can-Monitor-8-Different-Digital/32432732287.html) of the Saleae Logic device. It would be super unfair to the real developers.

I’m pretty sure auto-correct “corrected” my spelling.  
Anyway, that Chinese thing is probably worth exactly what you pay for it.

---

<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 16, 2015, 8:40pm UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/18 "2015-08-16T20:40:13Z")

</div>

> [@beowulff](#):
>
> I’m pretty sure auto-correct “corrected” my spelling.  
> Anyway, that Chinese thing is probably worth exactly what you pay for it.

I have a real Saleae Logic and one of the clones, and they function identically. The inside is just a CY7C68013A microcontroller and very little else. It doesn’t even store its own firmware, nor have any authentication, so it works with the Saleae software.

Obviously I think people should buy the legit device, but I got a clone for the same reason I (back when I still used spinny discs) ripped any CD I owned and kept the copy in my car. If it broke, got stolen, or whatever, I still have the original.

---

<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, 1:57am UTC](https://boards.straightdope.com/t/arduino-micro-controller-thread/727568/19 "2015-08-24T01:57:04Z")

</div>

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).

---

<div class="post-metadata">

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

</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).

Fun project!

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