LM3LTis a minimalist class written entirely in Matlab that simulates, with certain degree of physical realism, a Lego Mindstorms robot with its basic sensors and actuators:
Two independent motors (left and right) with simulated first-order rotation speeds.
Ultrasonic sensor with longitudinal noise of similar magnitude to the real one and also with the possibility of adding angular noise and beam thickness.
Reflected light sensor with measurement noise and with modifiable area of measurement. Picture files (e.g., png) can be used as light map on the floor.
Gyro sensor that mimics the behaviour (angle + velocity) of the EV3 gyro sensor.
Collision detection with obstacles (walls).
Physical parameters of the configuration (position of the sensors, radii of the wheels, etc.) can be defined at will.
This class is intended to provide an alternative to the use of the real robot in engineering contexts, for instance in university courses. It has been used intensively in a Robotics undergraduate course starting from the academic year 2019/2020 and in a Mobile Robotics master course starting in the academic year 2020/2021 (both due to the COVID-19 pandemic).
Its documentation is quite self-explanatory. A script skeleton is included in the downloadable.
You can download the latest version of the library here.
The SRAM Microchip 23LC512-I/SN is a very nice chip that can serve as external RAM (64KB) for the ATmega328P. This simple C library deals with block writings and readings to that chip from the MCU, in a most efficient way (it can use assembler code internally, and some hard real-time techniques for reducing the execution time, if the user wishes to).
It has been tested with the scripts for bare programming the ATmega328P of an Arduino UNO, i.e., with the compiler that comes with the Arduino IDE.
It uses the SPI module of the ATmega328P, and therefore its associated MISO/MOSI/SCK pins, for communications.
It always uses pin 2 of PORTB as output because otherwise the SPI module of the ATmega328P does not work properly. Nevertheless, the chip select for the SRAM can be B2 or D3.
Including the call to the writing routine and without interrupts enabled, the transfer speed is around 5 microsecs per byte of the transmitted block (200KHz).
Including the call to the reading routine and without interrupts enabled, the transfer speed is around 5.3 microsecs per byte of the transmitted block (190KHz).
This library allows the programmer to use the RS-232 communications of the ATmega328P (for instance, the one of the Arduino Duemilanove or UNO boards) directly.
It works correctly only with ATmega328P @ 16MHz.
The user can set the bauds (up to 2Mbauds), but the library forces asynchronous, no parity, 1 stop bit, 8 data bits.
It uses ISR-guided processing for receptions and no ISRs for transmissions, particularly USART_RX_vect, that has higher priority than ADC_vect and lower than external interrupts or timers. The ISR will delay the latter when executing -the non-interruptible code in this library has been kept to a minimum, though-.
Transmissions from the ATmega to the outside consist of commands of unlimited length ended in a given particular character.
Receptions consist of commands of a given maximum length, also ended in a given ending character.
Both transmissions and receptions are full-duplex. Receptions can be configured to receive and drop characters while using only transmissions (for instance, for tracing programs).
Include the .h in your program. In the sources there is an example demo of program. Compile your program, the .c file of the library, and link all of them together.
In your program, first call RS232_Init; then enable interrupts and use RS232_Read and RS232_Send at will; finalize your use of the rs232 system with RS232_Finish (it can be re-activated with a new RS232_Init).
In Windows and Linux you can use putty, for example, in order to connect to the arduino and test this library.
The Scorbot ER-V robotic manipulator arms, sold by Intellitek in the early 90s, are still -in their new models and in the oldies, if they still survive- a nice educational tool for Robotics subjects, lying in an intermediate level between real industrial manipulators and low-cost devices.
In engineering courses that deal with microcontrollers it comes handy to program the one in the Arduino board -e.g., the ATmega328P– directly (without the Arduino IDE), taking advantage of the bootloader that comes pre-installed in that CPU to upload the programs to the board through the USB port -without a programmer device-, but also writing code that is not polluted with Arduino libraries, interrupts that are stolen for internal affairs, or setup/loop artificial functions.
The following files provide that functionality. They work both in Linux and Windows, and have been tested in Arduino Duemilanove, UNO and Leonardo boards. They require the arduino IDE to be installed in your computer, which is only used (seamlessly) for compiling and uploading.
Download either the Windows or the Linux-bash versions of the compiling/linking scripts.
Modify the first section of the scripts (it is properly indicated in them) according to the path of the Arduino IDE in your computer. You can also add the S option for compiling in order to produce assembler code, and change the optimization options too.
The BABEL Development System is a software development framework intended for creating complex applications with the focus in coping with heterogeneity (typically, very different program code produced by different people to manage diverse software and hardware devices). It was born in the robotics domain, where heterogeneity is of the uttermost importance, particularly in today’s large scale and long-term projects.
It is neutral with respect to the programming language and underlying operating system, and covers several aspects of the robotic software lifecycle, such as the design, validation, debugging, implementation, testing, and manteinance phases.