Pages: 1 [2]   Go Down
Author Topic: Baby steps  (Read 9261 times)
0 Members and 1 Guest are viewing this topic.
Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've just looked at Maplins

I've got a maplin locally, it's handy if I need the occasional part and I can't wait for delivery but everything they sell is expensive.
Logged

Yorkshire
Offline Offline
Newbie
*
Karma: 1
Posts: 30
Our Kids Acorn
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As a rule I only use them if I have to. Other than that it's a selection of online electronic suppliers and ebay. With all the benefits of spending less.

regards

Fenrisulfr
Logged

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

Quote
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.
Have you checked out Lady Ada's tutorials?  I've heard good stuff about them from other newbies (I'm not necessarily a good judge,  since I've been doing software for about 40 years, and electronics for almost 50).

Quote
I just wish I had a compiler that could take BASIC instructions and convert them to C.
There used to ba critter known as BASTOC (possibly back in the days of DOS).  It didn't turn up in a quick google search, but something called BCX did.  I have no idea whether it's any good, but it might be useful to run it against some simple BASIC programs and see how the constructs you're familiar with are expressed in C.  Or it might generate godawful (bleep) that teaches you terrible habits.  Caveat programmafactor  smiley
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1658
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll be honest, I've not always been a fan of C.  I started learning it in 1982/1983 (oh what a giveaway).  I still have my tattered 1978 Kernighan and Ritchie book handy.  My problem was that I had started to learn Basic and Pascal before I looked at C and every time I looked at it it gave of an... "I'm not finished" vibe.

I eventually found C inescapable and pervasive in both work and hobby.  Finally, thanks to somewhat to the Arduino influence, I find C not so bad anymore.  I even now find it elegant in it's simplicity at times.  I guess it just takes looking at it from a different angle to gain a new appreciation for something you once thought of as disarranged and somewhat sloppy.

And I LOVE THIS comment:

Quote
My coding is an art-form, a fusion of Jackson Pollock and Tracey Emin.
Logged

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I just wish I had a compiler that could take BASIC instructions and convert them to C.

I feel your pain but the other way round. I've just had to do some work in Visual Basic.net and it nearly made my ears bleed! I'm used to more formal languages and couldn't cope with VB, not when coding in Notepad.
Logged

Abq NM
Offline Offline
Newbie
*
Karma: 1
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I started with LISP because my background is on the CAD side of things, progressed to VBA then .NET and then got into creating Gcode.   Found if I did not want to do things manually in the CAM software, I was going to have to learn some C.  Been doing that off and on for 12 years now.
Even have learned a little Ruby for helping a friend.

I think C/C++, have to include C# as well, syntax is much harder to learn but there is so much more you can do.

I can always tell when I have spent too much time (about 30 minutes)coding in C though, I put a semi-colon at the end of every sentence.  smiley

Glenn
By the way I do not consider myself a good C programmer, I am definitely on the bad hack side.
Logged

"Some cause happiness wherever they go;
others, whenever they go.." - Oscar Wilde

Wigan, UK
Offline Offline
God Member
*****
Karma: 19
Posts: 814
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I put a semi-colon at the end of every sentence.

All good languages require a semicolon.
No good language uses a single = in a comparison.
Logged

Yorkshire
Offline Offline
Newbie
*
Karma: 1
Posts: 30
Our Kids Acorn
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have just had a brown trouser moment! I changed some code to try and get a row of LED's to run from right to left instead of left to right..........Locked the board up the green LED was going bonkers!

Programmer could not be uploaded to =O

Went to the directed to web page. Nothing similar to the listed issues.

So in the end I did the following. Partially based on resetting a router when it goes AWOL =D

I held the reset button down inserted the usb and hit upload.....my timing seems to have been perfect as It's now all working again......thought I'd fried it! And me with 70 breadboard hookup wires on the way =D
Logged

Gloucestershire, UK
Offline Offline
Full Member
***
Karma: 1
Posts: 110
Outta Steam
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oooooooooops!  Close call!!   :o

Now, if that had been me, I'd have pulled the USB connection, gibbered a bit, crossed my fingers whilst praying to the god of fried circuit boards, then plugged it in again.........

Then I'd cry, bin the board, which with my luck would be giving a good impression of a fine Cuban cigar, and get drunk.

The next morning, whilst desperately searching the internet for a hangover cure, I'd undoubtedly order up a new Arduino board.  Some people never learn - although I have ordered a second hand copy of Kelley and Pohl's Book on C, so maybe I might be able to disprove the theory of old dogs and new tricks.....although I doubt it :smiley
Logged

Yorkshire
Offline Offline
Newbie
*
Karma: 1
Posts: 30
Our Kids Acorn
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like I tried to change the wrong part of the code. I think, and I'm only guessing, I sent the arduino into a loop that was so fast it couldn't communicate with the PC.

I found the correct bit of code today and have changed the direction of the 8 LED's.........GOSH! Aren't I clever  ;D

regards

Fenrisulfr
Logged

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

I may be wrong but I don't think there's any way your program can kill the upload. The processor is reset at the start of an upload, nothing you can do will affect that unless you're playing with writing to the flash and overwrite some of the boot loader, which I doubt.

______
Rob

« Last Edit: January 21, 2011, 10:03:35 am by graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Yorkshire
Offline Offline
Newbie
*
Karma: 1
Posts: 30
Our Kids Acorn
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess I may have just terrified the chip to death  ;D

At least it is working again though.

I changed the some numbers around and symbols to change the direction of the LED's.

Then I realised I only had to swap the 'HIGH' and 'LOW' of the two lines that loop to change the direction  ;D ;D ;D

So much to learn so little lifespan!

regards

Fenrisulfr  
Logged

Pages: 1 [2]   Go Up
Jump to: