Arduino Intro on Linux Mint

Print Friendly, PDF & Email

I bought the Elegoo R3 Project Super Starter kit from Amazon, £30:

What you get, more or less:


In one evening I got the first basics done – A/D converter  resistor, temp/humidity sensor then the thermistor/LCD projects. Very educational!
sudo apt install arduino
sudo tail -f /var/log/syslog
Plug in Arduino Uno R3 to printer cable and PC USB to find serial/USB name, which for me is:  /dev/ttyACM0
Aug 7 00:38:53 quad kernel: [14028.054126] cdc_acm 7-1:1.0: ttyACM0: USB ACM device
You may need to be added to the dialout group and make the device rw:
sudo chmod a+wr /dev/ttyACM0
sudo adduser stevee dialout
*Version 8.9  now wants:
stevee@quad ~/Arduino/arduino-1.8.9 $ sh arduino-linux-setup.sh stevee
******* Add User to dialout,tty, uucp, plugdev groups *******
The main problem you may meet at install is if you have (naturally !) created a folder called /Arduino and unpacked the zip of the IDE and examples in there, as it complains that your are in the same folder as the sketchbook – even if sketchbook does not exist AT ALL! Why they just dont say “not inside Arduino folder” or similar I dunno!
“Picked up JAVA_TOOL_OPTIONS:
Incorrect IDE installation folder: Your copy of the IDE is installed in a subfolder of your sketchbook.”
Move the unzipped /arduino-1.8.x/ outside of your /Arduino folder and then the IDE should open a sketch…duh!
Serial comms between PC and Uno should now work.
You can find serial ports with python e.g:
python -m serial.tools.list_ports
/dev/ttyS0
Python has a miniterm too:
python -m serial.tools.miniterm /dev/ttyS0
— Miniterm on /dev/ttyS0 9600,8,N,1 —
— Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
— pySerial (3.0.1) – miniterm – help

— Ctrl+] Exit program
— Ctrl+T Menu escape key, followed by:
— Menu keys:
— Ctrl+T Send the menu character itself to remote
— Ctrl+] Send the exit character itself to remote
— Ctrl+I Show info
— Ctrl+U Upload file (prompt will be shown)
— Ctrl+A encoding
— Ctrl+F edit filters
— Toggles:
— Ctrl+R RTS Ctrl+D DTR Ctrl+B BREAK
— Ctrl+E echo Ctrl+L EOL

— Port settings (Ctrl+T followed by the following):
— p change port
— 7 8 set data bits
— N E O S M change parity (None, Even, Odd, Space, Mark)
— 1 2 3 set stop bits (1, 2, 1.5)
— b change baud rate
— x X disable/enable software flow control
— r R disable/enable hardware flow control
Get and unpack the latest linux 64 bit IDE files for from:
https://www.arduino.cc/en/Main/Software
Also, in Preferences, set Show verbose output on uploading to help with errors…it shows a lot of info on upload:
Sketch uses 17410 bytes (56%) of program storage space. Maximum is 30720 bytes.
Global variables use 1458 bytes (71%) of dynamic memory, leaving 590 bytes for local variables. Maximum is 2048 bytes.
/home/stevee/arduino-1.8.9/hardware/tools/avr/bin/avrdude -C/home/stevee/arduino-1.8.9/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_20487/steve_station.ino.hex:i
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is “/home/stevee/arduino-1.8.9/hardware/tools/avr/etc/avrdude.conf”
User configuration file is “/home/stevee/.avrduderc”
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
———– —- —– —– —- —— —— —- —— —– —– ———
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file “/tmp/arduino_build_20487/steve_station.ino.hex”
avrdude: writing flash (17410 bytes):
Writing | ################################################## | 100% 2.88s
avrdude: 17410 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_20487/steve_station.ino.hex:
avrdude: load data flash data from input file /tmp/arduino_build_20487/steve_station.ino.hex:
avrdude: input file /tmp/arduino_build_20487/steve_station.ino.hex contains 17410 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 2.30s
avrdude: verifying …
avrdude: 17410 bytes of flash verified
avrdude done. Thank you.

Run the arduino file as an exe to open the “sketches” window and explore the menus, set board model, serial ports, basic tutorials etc:

Make an Arduino Temperature Sensor (Thermistor Tutorial)

Arduino LCD Set Up and Programming Guide


Combine the two tutorials and code to make the temp display on the LCD screen…
I converted to deg C from F in the sketch window:
if you have probs compiling, all these need to be exes:
chmod +x /home/stevee/arduino-1.8.9/hardware/tools/avr/bin/*
———————————

 


My 9.5V solar panel powers the Uno:

The same SDR module aerial will hopefully work with the ARCELI NEO-7M UBLOX GPS Satellite Positioning Module with SMA Antenna Interface.
My LCD shows:

I’m looking forward to the GPS project here: