--- Blinking LED ---
The Hello World cliche is still blinking... Hello, I'm Jesse. I've been fascinated by the magic of modern tech. My interest is programming the AVR which is a family of microcontrollers (MCU) developed by Atmel, acquired by Microchip.
I did put together a rudimentary robot to study the interfacing and programming the MCU. Yet, there are many inexpensive two wheeled differential drive mobile robots (DDMR) on sale. Google the keywords Arduino Differential Drive Mobile Robot and then select the Google tab Shopping... The MageMCU repositories have experimental software that will work on these robots: two-wheels with caster, 4-wheels or tracks. The brains for the DDMR is the most used and popular Arduino Uno Rev3 board (UNO).
At the heart of the UNO is the Atmega328P-PU (atmega328p) MCU. The 28-pin DIP package is easily replaced if damaged. Furthermore the UNO board with the atmega328p chip removed can be used as a programmer.
- The Arduino to a Microcontroller on a Breadboard Uploading a Sketch Using an Arduino Board
- Remove the atmega328p chip from the UNO in order to use the UNO as a programmer...
- See datasheet (pdf file) for the Atmega328P...
Note that Bootloader below clarifies and exemplifies the one described here...
The Atmega16U2 chip on the Arduino Uno board acts as a bridge between the computer's USB port and the MCU serial port.
- Updating the Atmega8U2 and 16U2 on an Uno or Mega2560 Using DFU
- Note that updating this chip is rarely performed unless a new chip is placed on the UNO.
- See datasheet (pdf file) for the Atmega16U2...
- Burn the bootloader on UNO...
- UNO R3
- UNO R3 Schematic
- Notice where in the schematic the TX-RX and the RX-TX connections cross between the atmega16u2 and the atmega328p. The wiring in a serial communication is connected such that the TX of one device like the atmega16u2 is connected to the RX of the other device like the atmega328p, and its RX is connected to the TX. Do not forget to connect the ground (GND) wire amoung all devices used...
- UNO R3 Schematic
- UNO R3
- Arduino as ISP for Arduino Bootloaders
- Many beginners use the Arduino IDE software.
- The advanced AVR programmers may use the MS Visual Studio Code using the PlatformIO core.
- Bringing Arduino Into the Professional Environment
- AVR Professional Programming Software
- Getting Started with Microchip Studio
- Note that the software Atmel Studio 7 is now called Microchip Studio.
- Getting Started with Microchip Studio
- For the Raspberry Pi depending on the memory, the following editors will be used Geany, Code::Blocks, MS VS Code and Arduino IDE.
- Study the AVR Tool Chain - Essential Guide used for Makefile - Standard C library for AVR-GCC
- AVRdude Utility
- This has a PDF file for AVRdude.
- AVRdude Utility
- Using make and writing Makefiles
- When writing a MakeFile that uses avr-gcc, avr-objcopy and avrdude, Google search the keywords: Makefile mFile Atmega328P Github. Learning how to use these MakeFile templates is a great way to understand the AVR Tool Chain.
- Use the following make example as a guide while studying the AVR Tool Chain. Save a copy and expand those sections with additional comments (#) with a better description...
- When writing a MakeFile that uses avr-gcc, avr-objcopy and avrdude, Google search the keywords: Makefile mFile Atmega328P Github. Learning how to use these MakeFile templates is a great way to understand the AVR Tool Chain.
- The procedural C prograomming language is used by beginners and then move to object-oriented programming (OOP), the C++ programming language.
- Programming: Principles and Practice Using C++, 2nd Edition - (Pearson - Learning. For life.)
- Author: Bjarne Stroustrup's homepage.
- Source: More information on his book, PPP2.
- Support for PPP2 This includes the source code for the book.
- International Organization for Standardization (ISO) & Resources - source
- ISO Get Started
- C++ Reference - source
- Standard Library Headers
- This is the reference for the Raspberry Pi...
- Archives for offline viewing - source Use the HTML ZIP file
- Be carefull when using the Standard (STD) Library with Arduino Boards.
- Use the Arduino Documentation instead of the STD Lib...
- Arduino Docs - In the left column, select Language Reference
- Functions
- Variables
- Data Types - Here you'll find string and String()
- Structure
- Standard Library Headers
- The reasoning behind the repository publication is to further my studies in the C++ programming language to include C++ templates along with C++ meta programming. Many in the industry would narrow the modern C++ language down by encapsulating it into a singularity called abstraction. Unfortunately, many like myself where the modern C++ abstraction is difficult to grasp.
- The Arduino integrated development environment (IDE) is a cross-platform application (for Microsoft Windows, macOS, and Linux operating systems)...
- Many older computers may be made to use a Linux operating system like Ubuntu which is recommended when connecting electronic circuits by USB because electrostatic discharge (ESD) may occur when the flow of electricity is interrupted along the circuit. For example, the data acquisition to your computer from a circuit running dc motors may well blow the USB circuit on the computer.
- The new Raspberry Pi 5 (Pi5) and its operating system is an inexpensive linux platform that is often used with the Arduino IDE. The Pi5 with 8GB has plenty of memory and processing power to run the Arduino IDE 2, VSCode with PlatformIO without any issues. If an ESD occurs on the Pi5 USB, the Pi5 can be replaced at a low cost...
- This is what the author uses for AVR programming.
- Arduino Core
- Arduino Libraries
- PlatformIO Documents
- PlatformIO Project Configuration File platformio.ini
- PlatformIO Registry
- MCUdude MightyCore
- RadioHead used for nRF24L01+ radio.
- WiringPi will be used in up-coming Raspberry Pi Projects...
- Writing the Laboratory Notebook (US Department of Education) - (PDF file)
- Laboratory Notebook with permanent numbered pages.
- Scientific Notebook Company - (Take a look at an example on lab notebooks)
- Introductory Circuit Analysis author Robert L. Boylestad, 13th and now the new 14th edition
- Laboratory Manual for Introductory Circuit Analysis, 13th edition
- Bad bad physics - from Maxwell's equations to Kirchhoff's Laws - don't fret it's all good - ha ha
- MIT OpenCourseWare - Circuits And Electronics - Includes video lectures...
- Study Ohm's Laws while learning how to use the Multimeter
- Say the following five times real fast...
- amps ohms volts
- Say the following five times real fast...
- Oscilloscopes 101 for Engineering Students
- Make a One Desk Electronics Lab
- Electronics Lab Bench Setup Guide
- Making a Home Laboratory for Fun Projects
- Safety Data Sheets, where to find MSDS and SDS on the internet... Safety Comes First.
- Lead - Safety Data Sheet (SDS) This is from Fisher Scientific.
- Lead Solder Alloy - Material Safety Data Sheet (MSDS) This is from University of Texas at Arlington.
- Tin/Lead Solid Solder - Safety Data Sheet (SDS) This is from Weldcote Metals.
- OSHA Laboratory Safety Guidance PDF
- OSHA Hazard Communication Safety Data Sheets Quick Card PDF
- Pb Lead-Free RoHS Exempt PDF
- Five essential tools for electronics lab safety
- Parents and Teachers On Safety Transparency
- As a warning, such laboratories at home or at school may catch fire.
- Recommended Student, Parent and Teacher Signed Agreement
- Emergency Phone Numbers
- Home Address
- Contact Information
- Legal Permissions for Hospitalization
- Legal Disclaimer
- Witness Name & Signature
- Sign and Date
- Recommended Student, Parent and Teacher Signed Agreement
- The motivation behind this type of an agreement, there is not enough all-around laboratories in our public schools for vocational readiness. Let's get America back to work.
- As a warning, such laboratories at home or at school may catch fire.
- In the Joystick.h file, the algorithm uses abs() function but it uses the (int) integer type instead of a float...
- Has yet to be incorporated into the older repositories...
- I caught this while coding - Wireless Communication - nRF24L01
- As of 20240813, the code was added to MiscMath.h. See all header revisions in the include folder in both the Wireless Communication and the Joystick Uno L298N repositories.
template <typename T>
T absT(T val)
{
T zero = (T)0;
if (val < zero)
val *= (T)-1;
return val;
}
- The Joystick Uno L298N repository has been updated with this fix. Other issues including expanding the L298N Bits() function from eight (8) to sixteen (16) combinations which finishes with the Motor Movement Checklist (MMC). The article 1009 - L298N Supplemental has been updated with more informtion in how to use the L298N Bits() function along with the MMC.
- Any products, services, and/or mediums like youtube videos described here on the MageMCU Github Account are considered unintentional and purely coincidental promotions and thereby to make clear any idea of such promotions should be interpreted solely as intended for the use for educational purposes only...
- BUYER BEWARE - this Github account uses links to Amazon marked as Å that reflects parts used. Transparency at this Github account is imperative. All issues related to Å products should be directed to Å.
- The MageMCU Github account is actively hacking away on experimental code for the Arduino Uno Rev3. This includes testing and updating the software. Keep it simple.
- This page is meant for the author and belays with the author. If anyone disagrees with its content, please contact the author...
- Jesse Carpenter doing business as Carpenter Software - Email: carpenter.software.jc@gmail.com
- Please follow the Disclaimers and Terms in each of the repositories including the Disclaimers and Terms by Github.
- MageMCU repository revised 20241014