Wellys Dev

  • Home
  • Search/Topics
  • Writings
  • About

    2024

  • 2024-07-23
    Developing in C for the ATmega328P: A Second Serial Port

    Where I discuss in detail, adding a second serial port to the Uno, soft_serial, and how to use it.

    Introduction

    While I was developing code for a robotic arm, I realized it would be best, if I used one serial port for communicating with the arm and another serial port to accept commands for the arm. Thus I created a second serial port, called soft_serial.

    The port didn’t need to be fast, as it would be used as a communication link between someone on a keyboard and the Uno. It needed to do the following:

  • 2024-07-19
    Developing in C for the ATmega328P: Better Serial Input

    Where I discuss how to improve on the serial input of C and the ATmega328P and adding a second serial port, soft_serial.

    Introduction

    In the example serialio_string (code on GitHub or below), I demonstrate the problem with reading text from the serial port. If you use scanf(), it appears to work well, except you can easily over-run the buffer. For example, the program asks for “up to 7 char”, however, it will accept as many as you are willing to type. More than likely, after about 20 characters, the microcontroller will crash.

  • 2023

  • 2023-03-19
    Embedded Ada on an AVR Microcontroller: Introduction

    Where I begin to explore using Ada on an Arduino Uno.

    Introduction

    On the Adafruit site, I ran across a mention of an award as to an “Ada Crate on an AVR” microcontroller. Which I found fascinating. Ada is a language developed for larger computers and wasn’t something I would expect to fit on to the AVR-series of microcontrollers.

    This led me down a path of attempting to understand:

    1. What is Ada as it relates to microcontrollers?
    2. Is there value to using Ada on a microcontroller as compared to C?
    3. How do I do so?

    This post describes my journey and how to begin to develop in Ada on an Arduino Uno or AVR ATmega328P

Copyright © 2025 Lief Koepsel
  • Home
  • Search/Topics
  • Writings
  • About