The Arduino micro controller is a great interface that allows your computer to do things with the world around it. It can measure and record things like temperature, humidity, light (also infrared signals), sound, motion, distance, magnetism and color. It can blink and buzz, run motors, water your plants and sniff trails to follow and whatever else you want to do to enjoy.

The UNO model is about $10, and a kit with a fist full of sensors goes for as little as 40 bucks. It uses C++ to program. Once programmed you can disconnect it, it will work on its own. Don't be afraid of C++, it is as simple as Python with a lot of semicolons to trip over.

A computer without an Arduino is only half there!

Recommended Answers

All 39 Replies

Here is a typical example for an analog input, setup() and loop() are are boiler plate function names:

Sorry,
this Arduino sample code has a bit more power:

My introduction to this topic is not A.I.Slop! It is written from years of my actual experience with the device.

commented: I've asked that be removed. ChatGPT writes like that so you are the one that was ripped off. +0

Ruining someones reputation seems too be the thing to do! At that rate I will be negative soon!

I've asked that be removed. ChatGPT writes like that so you are the one that was ripped off.

I've removed the downvote.

There are ongoing efforts within the Arduino community to look at MicroPython as a language for programming the various controllers. I personally am very fond of C++ and could live with it. Of course I am a Pythonista too! Any opinions?

The 'Artificial' in A.I. might be okay, but it does mean 'not real' or 'fake' remembering the hard times after WW2.

Hey, my reputation is now almost zero! I must be stepping on someones foot!

commented: Apologies. ChatGPT ripped off your style. +16

Hey, my reputation is now almost zero!

What do you mean? I see you have 27 upvotes and zero downvotes. You have +5 rep and you've only been posting since August 12.

Thanks Jim,
there was a short couple of days were I was down to 5 points! Hopefully fixed now! I called back my goon-squad!

My old Windows11 laptop is being used again. I am using it because it has an extra USB port free that I have connected to an Arduino UNO now. I promptly ran into a problem with an old UNO "compatible" unit made by "Miuzei". The newer Arduino IDE refuses to talk to the cheap imposter. I have no problem with any other brands I have. Playing around with various color LEDs and use them to generate voltage with light, that I measure with one of the six analog inputs. The result goes to the computer to be plotted/evaluated with a Python program.

Could not find the box of sensors and indicators for the Arduino, so I ordered an assortment from Walmart (ca. $20) that should arrive tomorrow. Then it's time to program the thing. Will be using C++ and Python.

Well, the assortment came, a nice fishing tag box with each item in a small zip-lock bag. A number of LEDs, some for infra-red, RedGreenBlue, 2 color RedGreen for mixing, and a cute 7 color flasher, all very tiny with pins for a standard breadboard. The sensor with the microphone has opportunities One of those 'clapper' gadgets that can turn things on or off should be easy. Have the computer analyze the sound and close the window when it thunders? The sound of breaking class setting of a warning! The height of automation for a few bucks.

Another headsup, the Arduino UNO R4 version is much improved over the R3 version, a bit more expensive ca. $30 or less.
The specs are impressive: https://docs.arduino.cc/tutorials/uno-r4-minima/cheat-sheet/
I just went ahead and ordered one from Walmart, should be here in about a week.

Right now I am exploring the OLED display, works great for showing results without the use of the computer.

An Arduino IDE code example of the OLED display (also from Walmart online) used with an UNO R3:
Some helpful notes are attached to the end of the code.

Sorry, on the 'OLED_milli_time.ino' example you need to change to a smaller text size like
display.setTextSize(1);
After the millisecond count reaches 6_000_000 the minute line would otherwise overflow into the next line.

Here is a LED color flipper based on the millisecond stream using even/odd values. A little different.

I am thinking about a temperature sensor using the Arduino UNO that will transmit its data to the computer for evaluation with a Python program. Got the Arduino part going.

I just received an 'Arduino R4 WiFi' in the mail. Same size as the R3 version, but much improved capabilities, cost less than $30. Looks high quality, assembled in Italy. Plug it in with a USB cable, I used a shielded cable with a USB-2 plug on the computer side, and a USB-C plug on the UNO R4 side. Or just use the 6-24 VDC barrel plug to start the little precoded LED matrix show.

It needs the newer version of the Arduino IDE. Here is an initial summary of the things I could find out:

Sorry, it looks like DaniWeb does not like my table with 4+ spaces!!!!
My attempt to post it as a Python file also failed misserably!!
Let me sleep over this grab!

All other pins are the same 14 DIO, 6 AI, 6 PWM, UART, I2C, SPI, +5V ~200mA

Extras on the R4 WiFi:
12×8 red LED matrix, Qwiic connector, Real Time Clock, access to onboard OPAmp,
RGB LED access, WiFi + Bluetooth, true analog audio/signal generation (DAC),
CAN‑bus automotive/industrial communication, faster math (math processor)

Since I use my old Windows11 Laptop I called on 'Copilot' for some helpfull info and found it charming.

The pins are marked very readable. I also ran a short code (C++) on it as an example:

A peek at the ill tempered table missing from the last diatribe .........

UNO R3 processor = ATmega328P, 8‑bit, 16 MHz
UNO R4 processor = Renesas RA4M1 Cortex‑M4, 32‑bit, 48 MHz

UNO R3 memory = 32 KB Flash, 2 KB SRAM, 1 KB EEPROM
UNO R4 memory = 256 KB Flash, 32 KB SRAM, 8 KB EEPROM

Aghhhh! Himmel, Tod und Teufel! I give up!

Here it goes one more time.........
Should not even try to post Python code on a C++ forum. The spaces get screwed up.

Ahh! Python to the rescue:
Still, the result does not match what shows on my Spyder IDE!
Must be the font that Dani uses!

I finally got a hold of the 16x2 Liquid Crystal Display that has the I2C connection.
The normal non I2C version is most frequently included in Arduino Kits and requires
a rat's nest of wires to connect (counted 14), for an example see:
https://www.circuito.io/app?components=512,11021,341099
The I2C version requires 4 wires, 2 for power and 2 for the I2C protocol, see:
https://www.circuito.io/app?components=512,11021,417986

To make it work you have to install the 'LiquidCrystal_I2C' library on your Arduino IDE.
Got mine set up with a regular Arduino UNO to count seconds. One important note,
adjust the little trim-pot on the backside of the I2C version for proper contrast,
so the characters show up.

In the previous Arduino example we counted down seconds to test an LCD display. Just for the curious, how long can C++ 'unsigned long int' go in seconds? Its late in the day, so I used Python to show it:
(Sorry for the print("unsigned lomg in C++ is 8 bytes") 'lomg' should be 'long')

An example that uses the Arduino UNO to measure voltages and display them on a LCD. Also shows the limitations you need to observe.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.