Tags
Embedded programming
- Environmental monitoring with online data logging to Thingsv
- Grow monitors | What watches the watchers?
- LCD x Arduino
- Programming "Hello to the World" with C
- Breathing light : An arduino experiment
- Datasheet Atmel ATtiny24/44/84
- Echo : Programming.c
- Programming a programmer
- Arduino IDE, introduction
Background
When you have a stuffed printed circuit board, it will do nothing until you program it. There are many programming languages available, all with their own quirks, advantages, barriers to entry, etc. Within the Fab Academy, Arduino IDE is the most widely used programming enviroment. The code is relatively easy to understand and widely supported and documented online. On the other end of the spectrum is C. C is one of the oldest programming langauges and is a bit daunting for a fledgling programmer. I rather enjoy programming (although I am only a beginner) and would like to learn a language beyond Arduino IDE but I think for the next few months, I will focus mostly on Arduino as it is a good gateway drug.
Embedded programming posts...
- Environmental monitoring with online data logging to Thingsv | 2018 Mar 31 | 14 minute read
- Grow monitors | What watches the watchers? | 2017 Jun 14 | 9 minute read
- LCD x Arduino | 2017 Apr 06 | 2 minute read
- Programming "Hello to the World" with C | 2017 Apr 06 | 1 minute read
- Breathing light : An arduino experiment | 2017 Mar 22 | 8 minute read
- Datasheet Atmel ATtiny24/44/84 | 2017 Mar 21 | 3 minute read
- Echo : Programming.c | 2017 Mar 20 | 4 minute read
- Programming a programmer | 2017 Feb 25 | 4 minute read
- Arduino IDE, introduction | 2017 Feb 25 | 5 minute read
Over the past few months, I have continued to develop the electronics and programming aspects of this project. I now have a system for evualating power potential and environmental sensing, and logging all that data online to Things Speak, an open Internet of Things Platform. Previous to using Things Speak, I was logging data to an SD card. However, with an SD card, I need to periodically pull the data from the card. Extra work. Using Things Speak, the data is available to me and everyone else instantly, everywhere. There have been some issues with wifi stability and internet connectivity...
Simultaneous to the module development, I will produce some grow module monitoring equipment. Previously, I worked with a phototransistor sensor, an LCD output and wrote a basic graphical interface for live monitoring the phototransistor readings. Today, my goal is to combine these with voltage sensoring so I can begin tracking the correlation between sunlight and power generation in the bioelectrochemical testing modules. Starting with a little research, I found that by simply connecting an input voltage to an open ADC pin, I could take voltage readings. Duh. I have been doing this for weeks via the phototransistor. I returned to...
Arduino has a built in libary, "LiquidCrystal.h", for programming this type of LCD. I thought it would be fun to imagine a prototype of HAL 9000 prior to artificial intelligence using the LCD display to communicate and the LED to hint life. Arduino IDE is packaged with many sketches of LCD functions. Browse to File > Examples > LiquidCrystal and you can check those out. First, write in the sketch the command to send the library for the LCD. #include <LiquidCrystal.h> Then, you need to dictate which MCU pins are connected to the RS, E, DB4-7 pins of the LCD...
I tested the effectiveness of my build with a C program written by Neil Gershenfeld. The contents of the make file are mostly the same as my previous ATtiny44 board. Because I used the same resonator, the timing fuses are the same. Only the name of the C accompaning C file has changed. Create the hex and out files. make -f hello.LCD.44.make Using my FabISP... make -f hello.LCD.44.make program-usbtiny-fuses and then send the program... make -f hello.LCD.44.make program-usbtiny This feels good. Download project files
I now have a grasp of making slight adjustments to code and uploading code to my board. Now that I have a little taste, I want more, so I imagined a simple idea to go a step beyond the tutorials and example codes. An interesting thing to me about coding is how the process is not linear, like what can often happen in other design fields. I can start layering in code and then make a little game of optimizing that code for editing, total number of executions, or number of lines, for instance. In fact, speaking of games, I...
Datasheets are hardcore product manuals for instructing makers on how to integrate specific products (ie electronic components) into systems. Datasheets are typically created by the product manufacturer and include technical and performative characteristics, connectivity information, coding examples, etc. A datasheet for an electronic component, such as an MCU like the ATtiny44, typically contains the following: Feature list and overview Pin configurations and descriptions Timing diagrams Reset and interrupt handling Register description Memories details Input/output informations Clock system Power management Packaging details and configurations and much more! This is the first time I have read a datasheet and I have only...
I am testing the assembly of the board by attempting to program it using C... for the first time. Start by downloading the Makefile and the echo hello-world C program written by Neil Gershenfeld. To make things simpler, rename the *.make file to simple "Makefile". No extension. In MacOS the best way to do this is in the file information dialogue. Open the Makefile with a neutral editor, such as Textedit to learn about its setup. The first group of lines refer to the project name, the source of the project (echo hello-world C program), the Micro-controller (ATtiny44), and the...
An in-circuit serial programmer (ICSP) is capable of programming microcontrollers on various boards with only a universal serial bus (USB) cable and 6-pin insulation-displacement contact (IDC) to 6-pin IDC cable. The ICSP vastly simplifies what would otherwise be an expensive and laborious process across different chip types. First I installed Crosspack on my mac. Crosspack is a development environment for AVR microcontrollers and necessary to give the terminal app capability for the upcoming task. Next, from the FabTinyStar page, I downloaded the firmware source code. I added a link here as well. You can open the Makefile with a neutral...
This is Arduino: a family of open-source, programmable Atmel microcontroller-based boards an abstraction on top of standard C syntax and libs a cross-platform IDE a bootloader that can upload code without a hardware programmer a micro-USB port to plug into the computer, digital/analog input/output pins, a separate power jack, an ISP header, and a reset button For my purposes today, I will be using the Arduino IDE, an application written in Java in combination with my own fabbed TinyISP. In my limited experience, it is quite similar to Processing. (Unfortunately, I have forgotten everything else about Processing.) Programs may be...