Go Down

Topic: What would a layman do with C++??? (Read 3273 times) previous topic - next topic

Coding Badly

Programming is the act of adding behaviour to an otherwise inanimate object...

and having the capability to do quite a bit with metal has helped me improve functionality in my home and life

when I still haven't answered the basic question "What the *&%$ am I going to do with it?"

I've got a five month old girl

Combine the three.  For your daughter, build a metal flower that responds to her.  The first most obvious project is to build a metal flower that slowly opens when she is nearby and slowly closes when she is not.


And the next most obvious project is a chastity belt with proximity sensor and iPhone app that sends me a text when the boys get too close.  By the time she's old enough for boys, I'll probably have a smart phone......
and AWOL, the Dumas comment was from an american movie called Shawshank Redemption.  It's quite good you should see it...
bird denigration is a crime

Jack Christensen

bebo, love your post, especially the part about Angry Birds! Certainly there's a lot of technology deployed these days "just because we can" and I end up shaking my head at a lot of that. At the same time I'm probably guilty too, LOL.

Maybe rather than thinking of C++, or even "Arduino", think of microcontrollers and the ability to sense the environment and act on it. What can you imagine, that along with a little decision-making capability also brought by a microcontroller, that might represent an improvement in some day-to-day situation?

I can use a current project of mine as an example. The basement flooded while we were on vacation, due to a rare combination of (a) very heavy rain and (b) an extended power outage which kept the sump pump from running.

So I have a project which will sense power failures and also if the water level gets too high in the sump. It tracks the information on a web page, so that I can monitor it from anywhere, and posts any changes on Twitter, which in turn sends a text message to my mobile.

I could have spent several thousand dollars on a permanently installed generator setup, but with this approach, if I'm not home, I can just call my brother-in-law and have him start my portable generator. Not sure he knows he's part of the system, but hey, that's what brother-in-laws are for, right?


and AWOL, the Dumas comment was from an american movie called Shawshank Redemption.  It's quite good you should see it...

Seven oscar nominations... definitely one of the best movies I've seen.

About projects, I've seen a wheel chair control made with microcontrollers that would be perfectly achievable with an Arduino.

But like someone else said here. Look for mundane things that could be done by a small computer (arduino) and get cracking.
This... is a hobby.


Oct 13, 2011, 06:43 pm Last Edit: Oct 13, 2011, 06:52 pm by bebo Reason: 1
I have these flowers from an art show a while back.  I just started playing with the CapSense library, and with that and some RGB leds, this flower could be a nice little mood lamp.
bird denigration is a crime

Ran Talbott

The coding part is going slow, but every day a little more makes sense.  So I made the leap and got a C++ compiler and tried to learn the language.  That's where my enthusiasm waned.

That was an important clue.  There are some people who like programming languages for their own sake.  They become computer scientists, compiler/language designers,  etc.

What motivates you is using the language as a tool to make something practical happen. So what would worik better for you than trying to master most/all of C++ up front is to do what others have already suggested: build increasingly-complex projects based on the available examples, and master small pieces of C++ as you need them.  And rid yourself of any perceived need to master all of it: it's a big, complex language, and there are many parts you'll never use (unless, of course, you discover that you actually want to be a computer geek).  Think of it as like your pickup truck: the fact that it's possible to trick it out as a Baja racer or a tow vehicle for a 32-foot RV doesn't mean you need to learn how to do so if all you want to do is commute to work and haul your metalworking projects.

Nick Gammon

So have any of you written applications or programs that provided some enhanced functionality to your life?  Stuff that isn't done as easily by other means? 

First, according to the Wikipedia article on microprocessors:

About ten billion CPUs were manufactured in 2008. About 98% of new CPUs produced each year are embedded.

Ten billion a year, almost all of which are in embedded systems (ie. not someone's PC). That's a lot. And you can bet most aren't us hobbyists playing with C++.

I hear, or I guess, they are in light bulbs (the compact florescent types / LEDs), toasters, washing machines, dishwashers, sewing machines, and motor cars. I think modern motor cars have a half-dozen or more in them. They are in calculators, label printers, cameras, phones, TVs, video players, etc.

But why would you want to program one, rather than buy it off the shelf? Well I suppose it is because you want some custom functionality that either isn't available elsewhere, or is much too expensive, or "not quite right".

For my case, let me list some of the things I have done with them:

  • Garage-door sensor - warns me if I left the door open

  • Alarm clock for my daughter that only rings on weekdays

  • Specialized timer that beeps at the correct interval, and the correct number of times, to clean the coffee machine

  • Little "adventure game" on a chip

  • RFID-controlled security system for my front door - where family members can open the door by presenting a card

For me it's also an educational tool - it helps me understand more about the possibilities, and limitations, of the technology. Plus I can get my children enthusiastic about it as well.

Future applications could be things like: temperature monitoring, 3D printing, some kind of robot (for the fun of it!). Perhaps something that lets me know if I have locked all the doors in the house before going to bed. Then maybe a water-tank level sensor. Fish feeder. Cat amuser.

As for C++, the Arduino programming environment uses g++ and is in no way a "limited version". But I certainly wouldn't try to learn everything about C++ in the hope that something will one day become useful. First find an application, and then learn as much as you need to implement it. And maybe later on you will wonder if there was a faster, neater, more efficient way of doing it, and you may research that "better" way. Or maybe what you did first time will work perfectly well.

There are so many things you could do: music, lighting, entertainment, relaxation, cooking, cleaning, security, transport, tracking (eg. parcels).

In fact I think CNC is one of the more fascinating applications: program into the machine what you want and it cuts up wood to make a cupboard, or aluminium to make an aircraft.

And then there are the people who do things like combine GPS, depth sensor, clocks, transmitters, etc. and attach them to whales to see their migratory patterns (or birds).

To have fun with it, keep things simple (I always try to). If you wanted to, say, have a gadget that beeped and flashed a light when your attic got too hot you would have three major things: a temperature sensor, a light and a beeper. So get the beeping working first. Then flash a light. Then get temperature sensing working. Then use a bit of logic to combine them all. Learn what you need to achieve that. Then install it and see how it goes. Eventually you might want to tweak it (and you might not). Maybe you'll make it use battery power more efficiently. Maybe you'll transmit the temperature via a radio module to your room downstairs. You'll end up with something that does what you want, when you want it to. And learned a lot, and had fun in the process.
Please post technical questions on the forum, not by personal message. Thanks!

More info:

Jack Christensen

Here's a little project that I'm just starting. We like candles in the windows at Christmas time. Have tried a couple different kinds over the last few years, none of which work well, or just as I'd like. Some have very crude timers, some have photocells, and all are very poorly made. Technically this is not an ambitious project, just a microcontroller and a real-time clock. Probably not cost-effective. But still lots of fun. And if they don't work the way I want, I only have myself to blame, but I'm totally in control of changing that!

My advice would be not to worry about the "++" part initially, just learn basic C, you can do a heckuva lot with that. This project doesn't require writing any C++. I'll post pics of the finished project in a few weeks, just sent the circuit boards in yesterday.


I like that you attached the schem onto the project

I'd suggest putting it on the reverse side though

Also, looks slick, better than the store bought ones


attached the schem onto the project

Remember what all larger gadgets had the schematic glued in the cover or as part of the manual?

Rob Gray aka the GRAYnomad www.robgray.com

Jack Christensen

attached the schem onto the project

Remember what all larger gadgets had the schematic glued in the cover or as part of the manual?

Now that would be dating myself  ;)

Actually that's a printout of the PC board, to check location and fit. It'll go right there on top.


Actually, no

but I did salvage a microwave that had a schematic in the bottom for the repair man

Go Up