I'd just like to post my very first program that I made entirely from scratch!
Arduino rocks!
// Moter control with LEDs
// make a green LED blink as the motor turns on
// make a red LED blink as the motor turns off
#define MOTOR 9 // the pin for the motor
#define LEDR 7 // the pin for the red LED
#define LEDG 5 // the pin for the green LED
void setup() {
pinMode(MOTOR, OUTPUT); // the pin for the motor is an output
pinMode(LEDR, OUTPUT); // the pin for the red LED is an output
pinMode(LEDG, OUTPUT); // the pin for the green LED is an output
}
void loop() {
digitalWrite(MOTOR, HIGH); // turn the motor ON
digitalWrite(LEDR, LOW); // turn the red LED OFF
digitalWrite(LEDG, HIGH); // Turn the green LED ON
delay(1000); // waits for a second
digitalWrite(MOTOR, LOW); // turns the motor OFF
digitalWrite(LEDR, HIGH); // turns the red LED ON
digitalWrite(LEDG, LOW); // turns the green LED OFF
delay(1000); // waits for some time
}
I was just reading another post from you where you said you hadn't programmed before...
How does it feel to have a computer (even just the Arduino) do what you tell it to do?
If you keep at it, and you love doing it, it can lead to great things and great insights. Keep working at it, keep expanding your skills. Remember that what you are doing at a "high level" with C code, that there is more happening "under the hood" so to speak (indeed, you would be amazed at the "goings on" inside a PC CPU).
Remember that there is also an entire history behind this grand machine we call a computer (Did you know that the first "computers" were female? Did you know that the first programmer - and hacker - was a female? Did you know she coded for a machine that didn't exist - but that her programs worked flawlessly when they were run, 100 years later?).
I could go on - but I won't; these machines captured my imagination and attention ever since I was a boy of about 7 years of age (really, it started for me with Star Wars, the Cylons and other robots in the original Battlestar Galactica series, and the original Buck Rogers TV series - way back in the 1970s-early 1980s) - my career and life have been built around them, so to speak.
Good luck with your learning - it looks like you've made your important first steps!
@Artemis Fowl
Congrats on your first steps and cheers to the many more to come!
..it can lead to great things and great insights.
Perhaps the most profound thing i have gained from arduino--thus programming for the first time--is a new understanding/appreciation of the brain. Every now and then, I have a moment where I can see how much like a computer the brain really is. And I only wrote my first program last winter.
I very much agree. What might seemed hard at first is actually a great step in learning, during my roller coaster project I found myself running into parts I couldn't figure out at the time. Having a good night sleep and reading and understanding the codes other people made got me to understand what to do. Soon I started on more complex machines during the build so I knew what everything was doing. Eventually coding the final project was easy as pie. Arduino's are great and I'm most likely going to buy my third soon as I need the other ones in the project.
Perhaps the most profound thing i have gained from arduino--thus programming for the first time--is a new understanding/appreciation of the brain. Every now and then, I have a moment where I can see how much like a computer the brain really is. And I only wrote my first program last winter.
You're close - switch it around...
Yes, the brain is like a computer; you might want to follow this path, for it is a fascinating one - but the computer also has analogies to our brain; which is almost to be expected, once your start understanding all of this.
If I really wanted to, I could go on for pages and pages about this; suffice it to say, I have read and studied this subject in depth for most of my life - unfortunately (in some respects), none of it has been a "formal education"; rather, I have studied subjects like artificial intelligence, expert systems, neural networking, and others on my own, and not thru a university setting.
Based on my knowledge and understandings, as well as from what I have read (books, magazines, online, etc); I am firmly convinced that we are rapidly approaching the "knee" (indeed, right now I think we are on the very edge of it) in the "time vs computation" exponential curve which suggests the existence of what is known as a "technological singularity". Whatever this ultimately means or how it plays out (or when!) is anyone's guess, but most see it as ubiquitous artificial intelligence, life extension, and perhaps even mind/machine integration (beyond what we already have today!).
Did you know that humanity currently has the computational power to simulate the equivalent (though not in real time - yet) of a cat's brain? It wasn't too many years ago (maybe 5 or so) when we were only at the level of perhaps a small rodent's brain...
It won't be too many years before we'll have the computational power to simulate the equivalent of a human brain...
Without wishing to further derail the thread, I should point out there is no "knee" in an exponential curve. It's a smooth curve all the way up.
Eh, its derailed, what the hey...
;D
I wasn't meaning to imply a sharp change in the curve; however, most references to such curves (in relationship to the technological singularity) reference the change point as the "knee", where the curve really begins its rapid ascent (never going vertical, of course)...
That's what I meant, there isn't a point "where the curve really begins its rapid ascent". It all looks the same locally to someone "living" on a point on the curve.
Imagine someone living 1000 years ago - they were just as amazed that something that used to take 500 years to alter now changed in 100 years as we are that something that used to take 50 years to change now only takes 10. It's all a question of the scale at which you're looking at the curve.
This is of course correct with respect to a true exponential curve which is self-similar. However there are reasons to believe that some evolutionary processes behave along a hyperbolic curve (1/(t0-t)), which is much more interesting....
The loose term "exponential" is sometimes used also for this
That's what I meant, there isn't a point "where the curve really begins its rapid ascent". It all looks the same locally to someone "living" on a point on the curve.
True - but that's part of the point as well; we shouldn't be looking at this as if time is linear from our vantage point - one of things behind the concept of the technological singularity is that at some point, the changes will be coming on so fast (in theory, at some point not too far in the future - major changes will occur in technology in the span of days) - that we shouldn't be looking at things in a linear fashion, but should get used to it now that we are on this exponential curve.
I look at it this way - from my knowledge and understanding, I realize that as far as our technological advances are concerned, they are happenning at an exponential rate, and not linear. True, there is no "knee", but look at the actual curve (not the local view), and there we are, just approaching the beginning of the "fast" uphill climb...
I suppose we could argue about this until the cows come home...
I suppose we could argue about this until the cows come home..
Indeed And it all might be just a matter of our limited perception...
Things that happpened during the last 6 years seem as important to us as the things happened during the last 60 years (since WWII - say - or since the mid 60th, where a more important shift of thinking occured..). There are few people who can recall so many events for the last 600 years, and it seems to be the same number of events for the last 6000 years, since the dawn of urban civilization. H. sapiens is 60,000 years old, clever men maybe 600,000 years, who separated from the apes 6 M years ago, when the Alps and Rockies took their current shape...
The "new life" started 60 Mio years ago, complex life 600 Mio years ago and the star generation of our sun formed around 6 Billion years back (well, this does not fit so nicely )
Maybe this is just the way we think,not the way it is...