Go Down

Topic: Baby steps (Read 10043 times) previous topic - next topic

Fenrisulfr

Hi All

This is my first post along with my first foray into the 'black art' of coding. I have some experience with programming '........................' . Sorry that pause was whilst I laughed myself silly. For programming please read ZX81 - and perhaps 10 lines of basic.

I dabble in electronics and despite some success, DIY voice modulator manual on the project dalek boards, I am and always will be a rank amateur.

Due to some issues with retention of information I find it a bit of a slog. I have been avoiding uP's like the plague but am wondering if it may be a worthwhile path to follow. I will at least have a bash and see if I can do anything 'interesting'.

Or I may be swapping one set of 'problem solving' for another  ;D

For my Birthday my Lovely wife has ordered a arduino diecimila clone with a 328 uP on board. I have the IDE software installed on my Linux box and 3 weighty tomes, OK PDF's, to read and guide my first steps.

I have a few ideas, simple fare, of what I want to have a bash at but not a patch on the majority of applications the membership seem to be conjuring up.

I draw up my own PCB's and make them using the toner transfer method. I converted a laminator using a clothes iron thermostat  to get the hotter range needed to do the job.

Successful electronic projects I have done-
Voice mod for Dalek use. A lot of people from the UK, US and AU have taken up the design to use in their builds.
Knight rider LED array for 'Dalek Storm'
Sound and lights for dalek weapon system......you can see a pattern here cant you  ;)
A few LED props for a 'Doctor Who' Look a like, working on a 'Berylium chip' prop for him now to.
and various breadboarded circuits just to play with.

That's about it I think. Hopefully I'll have my arduino mid week and can start asking stupid good questions.

regards

Fenrisulfr

wossname

I'm fairly new to Arduino too, but I have a coding background (C/C++, C#, VB etc etc etc...).  I was pleased to discover that my programming skills from regular computers are very transferrable to the Arduino platform.  This is good news for you because it gives you the option to hone your coding skills by writing regular (non uP related programs) on a normal PC (and run them on the PC too).  In fact it's possible to take chunks of standard C code from a PC application and dump them straight into the arduino IDE and make them work with only a little tweaking needed.

I don't know what PC platform you use (Windows/Mac/Linux/other) but I tend to do most of my day-to-day coding (for my job) on Linux.  Writing C apps on linux is pretty similar to writing code for the Arduino, except that your IO and resources are obviously more limited on the Arduino.  The coding environment is familiar to any C/C++ coder, although the Arduino IDE itself is painful to use in my opinion.

Writing code for arduinos does make you consider resource usage a lot more than you would on a PC, which can only be a good thing.

Valalvax

#2
Jan 15, 2011, 07:08 pm Last Edit: Jan 15, 2011, 07:09 pm by Valalvax Reason: 1
What is uP? I tried a Google search but it wasn't very helpful, first I found the movie Up, and then I tried adding coding to it and got some sort of medical coding information...

>.>

Also... go Doctor Who whooo! :D

Osgeld

uP = microprocessor
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Valalvax

... Oooohhh

Yea, makes sense now, thanks :P

u0421793

Well, it's really µP.

Ran Talbott

Quote
although the Arduino IDE itself is painful to use in my opinion

kwrite (or Notepad2 if you're using Windoze) has good syntax highlighting for C and C++.

I only use the IDE as a sort-of "GUI make" and serial terminal.  Just load the source and go.


Fenrisulfr

Hi Chaps

I have an Ubuntu OS (Linux). I have been Windows free for 2 years......good grief I sound like a client at a 'Windows Users Anonymous' meeting  ;D

I have been reading sketch's, tutorials and watching youtube video's of everything Arduino. My mind is set to explode out of both ears I think. I get the drift but I fancy there is some subtlety in good coding which I hope will make more sense when I have my module and start trying the various tutorials.

It should be a laugh.....depending on your point of view.

regards

Fenrisulfr

CowJam

Quote
there is some subtlety in good coding


Good coding is an art form, your code should be as elegant as possible.

Fenrisulfr

I can do elegant.......It's the coding that's going to be iffy  :-/

My Module arrived today! It is in fact a clone, but no matter, it works!

The board is marked -

DFROBOT
DFRduino
Duemilanove

The make up of the board includes the 'auto' voltage/power input. Overall I am very pleased and my only niggle is that the crystal isn't sat flat to the PCB which is a non issue really.

As soon as I plugged the USB cable in the 'Blinky' sketch started running. So I placed an LED in Pin 13/GND and that completes my first lesson  ;D



I'll just scratch my head and wonder what to do next I think.....Over a lovely cup of Yorkshire tea!

regards

Fenris

AWOL

My coding is an art-form, a fusion of Jackson Pollock and Tracey Emin.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Fenrisulfr

Mine will be a mix of Copy/Paste mixed with a generous side order of desperation!

I have a pair of tri colour LED's flashing from red to blue in antiphase just copy/pasting code and adjusting pin numbers. A minuscule step but it works.

I think I need to go to Maplins and grap some 'proper' breadboard wires and a dedicated breadboard.

regards

Fenrisulfr

STDummy

I think I can safely say that you're not the only one floundering at the deep end.  This forum is a definite lifebelt, but no one put any instructions on it!

I think my own problem is that I have a distinct purpose I want to use the Arduino for, and most of the newby-orientated info I have come across so far assumes that you already have a degree in C!! - which I don't.  I haven't found anyone else's code that does anything near to my requirements - otherwise I would have plagurised the heck out of it already!!!

With my learning speed, I don't have enough of my allotted span left to start from scratch.  I just wish I had a compiler that could take BASIC instructions and convert them to C.  I might stand a chance then!  Yes, I had a ZX81 as well  :-[

There are some good deals on breadboards and patch leads on eBay I've noticed, if you want a low budget approach btw.

Fenrisulfr

One tip I'm going to follow is to 'flow diagram' what I want to do with a given circuit. It wont make the programming any easier but at least it can be broken down into 'chunks' that may be easier to get my head round.

I've looked at a lot of sketches and how-to guides and there seems to be the long hand method of coding and, when your really smart, the short hand method which uses array's and values to minimize the amount actual code needed to do the job.

I've just looked at Maplins for jumper wires...........£4 sterling for 10 pcs  of one length. ............ Ebay  70 pcs in 4 lengths £4. I know where my money will be going  ;D

I to have one specific project in mind. Actually I have already drawn it up and simulated it with out using a processor. The Arduino, once I get my head around the coding, will at the same time make the design simpler but allow a greater complexity to the control without having to add extra components here and there.

What have I let myself in for?

regards

Fenrisulfr

Valalvax

I worked through this book and thought it was a very good basic intro course: http://www.amazon.com/Getting-Started-Arduino-Make-Projects/dp/0596155514

It gives a couple of examples and walks you through understanding the code involved... note that all code involved is in the basics code available in the IDE

The final project they give is kind of to completely blow the poor newbie's mind, going from making a light blink when you push a button to pulling information from a website and making a tri-color LED glow a certain color based on the number of times particular words appear

Go Up