Once upon a time, in a Linux distro (32-bit Fedora(12?)/Gnome 2) far, far away, I had played briefly with a Duemilanove. After a lengthy hiatus, I am now inhabiting 64-bit Fedora 28/Cinnamon. Now that I am retired, I have the time to play with my Duemilanove again. Accordingly, I have installed the 1.8.5 IDE from the Fedora repository. The installation proceeded without error, and I have successfully used a couple of the example sketches to verify the basic functionality of the board.
Back in the day, sketch examples included a "Hello, World" that output to the computer monitor. I would like to implement that sketch as a jumping-off point to display data of sketches-under-development.
I have found a sketch that uses Serial.write and contains a "Hello, World", which compiles and uploads to the Duemilanove board without error. The Tools>Serial Monitor window opens, but when I try to run the sketch, I get a series of 4 backwards ?s.
Can anyone point me to the lamented missing "Hello, World" sketch, or alternatively, tell me how to efficiently search the forum for it? I could page through all 3300+ pages (and that appears to be only the page count for "Project Guidance"), but that would take years and cost thousands of lives. Google and the available forum search have not yielded anything useful.
IMO - [u]Blink[/u] is the equivalent of Hello World in Arduino-Land... It's basically the simplest program to make sure the IDE set-up and working, that you can download to the Arduino, and that the Arduino is running.
If you want an example of how to write to the serial monitor [u]Analog Read Serial[/u] should get you started. (And, for your purposes you can just read the floating analog input. You don't have to connect anything.)
Generally, Arduino sketches are written as a loop() with no main() but you don't have to loop if you just want to display "Hello World" once.
void setup() {
Serial.begin(9600);
while(!Serial){} // Prevent boards with native USB (Leonardo, etc.) from running the program before Serial Monitor is opened. https://www.arduino.cc/reference/en/language/functions/communication/serial/ifserial
Serial.println("Hello World");
}
void loop() {}
In this case, I have set the serial communication speed to 9600. So you need to make sure to select "9600 baud" from the dropdown menu at the bottom right corner of the Serial Monitor.
It did indeed turn out to be primarily a baud-rate mismatch. Duh! I'm particularly embarrassed due to my background: 9 years as a Navy electronics technician, and several more as an electronics technician/electronics designer in private industry.
Thanks for all the feedback. Unfortunately, further development is on hold: I am in southeastern Alabama, in the path of the approaching storm. Hurricane preps take precedence.