Baby steps

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. :slight_smile:

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

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.

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

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 ::slight_smile:

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



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.


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!