Wigan, UK
Offline
God Member
Karma: 18
Posts: 807
|
 |
« Reply #15 on: January 19, 2011, 06:14:51 pm » |
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
Newbie
Karma: 1
Posts: 30
Our Kids Acorn
|
 |
« Reply #16 on: January 19, 2011, 07:15:14 pm » |
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
Edison Member
Karma: 7
Posts: 1712
Incorrigible tinkerer
|
 |
« Reply #17 on: January 19, 2011, 08:24:44 pm » |
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). 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 
|
|
|
|
|
Logged
|
|
|
|
|
Port Angeles, Wa
Offline
Edison Member
Karma: 13
Posts: 1411
Ultimate DIY: Arduino
|
 |
« Reply #18 on: January 19, 2011, 09:40:38 pm » |
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: My coding is an art-form, a fusion of Jackson Pollock and Tracey Emin.
|
|
|
|
|
Logged
|
|
|
|
|
Wigan, UK
Offline
God Member
Karma: 18
Posts: 807
|
 |
« Reply #19 on: January 20, 2011, 10:05:18 am » |
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
Newbie
Karma: 1
Posts: 17
Arduino rocks
|
 |
« Reply #20 on: January 20, 2011, 12:11:12 pm » |
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.  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
God Member
Karma: 18
Posts: 807
|
 |
« Reply #21 on: January 20, 2011, 12:25:59 pm » |
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
Newbie
Karma: 1
Posts: 30
Our Kids Acorn
|
 |
« Reply #22 on: January 20, 2011, 05:28:46 pm » |
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
Jr. Member
Karma: 0
Posts: 57
Outta Steam
|
 |
« Reply #23 on: January 20, 2011, 06:19:07 pm » |
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 : 
|
|
|
|
|
Logged
|
|
|
|
|
Yorkshire
Offline
Newbie
Karma: 1
Posts: 30
Our Kids Acorn
|
 |
« Reply #24 on: January 21, 2011, 08:51:02 am » |
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
Tesla Member
Karma: 75
Posts: 6975
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #25 on: January 21, 2011, 10:01:09 am » |
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
|
|
|
|
|
Yorkshire
Offline
Newbie
Karma: 1
Posts: 30
Our Kids Acorn
|
 |
« Reply #26 on: January 21, 2011, 10:41:50 am » |
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
|
|
|
|
|
|