Pages: 1 [2]   Go Down
Author Topic: What would a layman do with C++???  (Read 2698 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12844
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Quote
and having the capability to do quite a bit with metal has helped me improve functionality in my home and life
Quote
when I still haven't answered the basic question "What the *&%$ am I going to do with it?"
Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

bird denigration is a crime

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4058
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3244
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* flower 2.jpg (54.18 KB, 350x467 - viewed 18 times.)

* trillium 5.jpg (71.87 KB, 459x611 - viewed 19 times.)

* slipper entry 1.jpg (136.56 KB, 320x427 - viewed 18 times.)
« Last Edit: October 13, 2011, 11:52:41 am by bebo » Logged

bird denigration is a crime

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 480
Posts: 18720
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Quote
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.
Logged


Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4058
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* XmasWindowCandles.jpg (182.2 KB, 800x600 - viewed 21 times.)
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Georgia, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 371
Arduino makes my head hurt :(
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8490
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4058
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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  smiley-wink

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

Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Georgia, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 371
Arduino makes my head hurt :(
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, no

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

Pages: 1 [2]   Go Up
Jump to: