Posts | Comments

Planet Arduino

While the world seems to be focusing on self-driving cars, maker Sieuwe Elferink has instead turned his attention to creating a semi-autonomous kids’ four-wheeler. As of now, the modified device can steer itself within a set of lines, and stop for pedestrians and inanimate objects.

The augmented vehicle uses an Arduino Nano for control, plus a pair of TCRT5000 sensors attached to tubing on the sides to pick up boundary lines. Obstacle avoidance is via an ultrasonic sensor on the front. Four relays are used to activate a former windshield wiper motor for steering through a chain and sprocket system, along with the vehicle’s original motor for propulsion.

The build process is documented here, while code and an electrical schematic is available on GitHub.

Halloween has become something of a hacker holiday, giving creative people the world over a chance to show off their spooky animatronic inventions outside without neighborhood scrutiny. This year, Instructables user “gocivici” created a display inspired by the doll in a rocking chair featured in the movie Annabelle, but decided to use an Arduino-infused teddy bear instead. 

The setup is simple but effective, using an Arduino Nano and solenoid to rock the chair. The bear’s head rotates using another Arduino board—an Uno this time—along with a second solenoid and 3D-printed assembly stuffed inside. Control is accomplished via a small wireless remote, though a motion sensor could also be employed.

We are very happy to announce the Arduino PRO Gateway for LoRa!

Combined with Arduino MKR WAN 1300 IoT nodes, it makes an ideal solution for a wide range of applications, like smart agriculture, smart cities and building automation – and many other remote monitoring use cases requiring long range, low power wireless connectivity.

The gateway can be used globally and enables multiple channel management. By supporting advanced features like Listen Before Talk (LBT), it allows users to transmit at higher power on the first free channel, achieving longer ranges than conventional gateways for LoRa. 

Arduino continues its mission of making complex technology easy enough for anyone to use. Customers of the Arduino PRO Gateway will be given exclusive beta access to the Arduino IoT Cloud, which makes installation, provisioning and remote management of the gateway incredibly simple through the popular Arduino Create cloud platform.

The gateway features the advanced Embit EMB-LR1301-mPCIe module, hosted by a Raspberry Pi 3 B+ SBC, in a rugged aluminum enclosure. The gateway comes pre-installed with an optimized packet forwarder and a carrier grade Network server for LoRa WAN that is running on the Arduino Cloud provided by A2A Smart City (part of the A2A Group).

Technical Specifications

  • Chipset: Semtech SX1301
  • Modulation: LoRa Spread Spectrum, FSK, GFSK 868MHz (EU) / 915MHz (US)
  • Number of Channels: 8 LoRa Channels
  • Operating Frequency: 868MHz (EU) / 915MHz (US)
  • Frequency Range: 860MHz to 1020MHz
  • Operating Temperature: -40°C to +85°C
  • RF Output Power: Up to +27dBm
  • Sensitivity: Up to -137dBm
  • Interfaces for the LoRa Module:  mPCIe (SPI / I2C / UART / GPIOs) :
  • Dimensions: 71x40x1mm
  • Operating Voltage: +5V
  • Additional Features:
    • Listen Before Talk (LBT) Capability (for improved transmission power management),
    • On-board uFL antenna connector
    • FPGA support for LoRa Spectral Scan

 

The Arduino Pro Gateway for LoRa (868 MHz , EU version) can be pre-ordered from the Arduino Store.

Generally when you work with CNC machinery, you program it on a computer, then allow a controller to automatically run through a cutting routine. Arduino boards have long been used for this kind of control through the grbl software package, but YouTuber Electronoobs decided to do things a bit differently.

His setup takes input from a potentiometer and several buttons, enabling manual control of his stepper motor-driven router. An Arduino Nano powers the motors through a pair of stepper drivers, while a second Nano is then used to output distance information on an LCD screen, letting him view exactly where his cutter is at a glance.

Why use 2 Arduinos? Well, if I use only one, the code would be very difficult with too much interruptions. We have to create pulses for the motors and print on the LCD at the same time. I’ve done that and each time I was printing on the LCD, there was a small pause in the motor rotation, and if the refresh rate is fast, the motors will have a pause each time and we don’t want that. That’s why I use 2 Arduinos. One will create the pulses for the motors and the other one will count the steps and print the distance and speed.

We have 2 step motors. I’ve used NEMA 17. Each with a A4988 driver. This driver needs 3 signals from the Arduino. Enable, direction and steps. The enable pin is connected to a toggle switch so we could start to stop the motors manually. The toggle switch is also connected to the Arduinos so we could know when the motors are enabled or not. To control speed we use a lineal potentiometer and to move axis and reset position, some push buttons with pulldowns. To print the distance, I’ve used an I2S LCD screen of 20×4 but you will have the code for the 16×2 version of LCD as well.

Besides adding a nice readout to the machine, this concept could certainly form the basis for all manner of other stepper-driven devices.

We don’t think [bleepbit] will take offense when we say the “poor man’s theremin” looks cheesy — after all, it was built in a cheese container. Actually, it isn’t a bad case for a simple device, as you can see in the picture and the video below. Unlike a traditional theremin, the device uses ultrasonics to detect how far away your hand is and modifies the sound based on that.

There are also two buttons — one to turn the sound off and another to cycle through some effects. We liked how it looked like a retro cassette, though. The device uses a cheap Arduino clone, but even with a real Arduino, the price wouldn’t be too bad. However, the price tag quoted doesn’t include a few connectors or the speaker that appears in the schematic. There’s a note that the model built uses a jack instead of a speaker, but it would be nice to include both and use the kind of jack that disconnects the speaker when you plug speakers or headphones in.

The code is simple and there are four possible effects you can cycle through with one of the buttons. Unlike a real theremin, you can trigger this one with anything the ultrasonic sensor can see. The Arduino audio quality is not superb, of course, but it is still a fun rainy day project.

We couldn’t help but think that a 32-bit Arduino could have used one of the sophisticated audio libraries. However, there are other libraries that might improve things even with the 8-bit processor.

Granted, this isn’t a true theremin, but we’ve seen plenty of those, too. We’ve even used the same sensors to control a PC.

A Raspberry Pi with a camera is nothing new. But the Pixy2 camera can interface with a variety of microcontrollers and has enough smarts to detect objects, follow lines, or even read barcodes without help from the host computer. [DroneBot Workshop] has a review of the device and he’s very enthused about the camera. You can see the video below.

When you watch the video, you might wonder how much this camera will cost. Turns out it is about $60 which isn’t cheap but for the capabilities it offers it isn’t that much, either. The camera can detect lines, intersections, and barcodes plus any objects you want to train it to recognize. The camera also sports its own light source and dual servo motor drive meant for a pan and tilt mounting arrangement.

You can connect via USB, serial, SPI, or I2C. Internally, the camera processes at 60 frames per second and it can remember seven signatures internally. There’s a PC-based configuration program that will run on Windows, Mac, or Linux. You can even use the program to spy on the camera while it is talking to another microcontroller like an Arduino.

The camera isn’t made to take sharp photos or video, but it is optimized for finding things, not for picture quality. High-quality frames take more processing power, so this is a reasonable trade. The camera does need training to find objects by color and shape. You can do the training with the PC-based software, but you can also do it with a self-contained procedure that relies on a button on the camera. The video shows both methods.

Once trained, you can even have an Arduino find objects. There’s a library that allows you to find how many items the camera currently sees and find out what the block is and its location. The identification clearly depends highly on color, so you’ll probably need to experiment if you have things that are different colors on different sides or has multiple colors.

Sure, you could use a sufficient computer with OpenCV to get some of these results, but having this all in one package and usable from just about any processor could be a real game-changer for the right kind of project. If you wanted to make a fancy line-following robot that could handle 5-way intersections and barcode commands this would be a no-brainer.

We’ve seen other smart cameras like OpenMV before. Google also has a vision processor for the Pi, too. It has a lot of capability but assumes you are connecting to a Pi.

Before computer games had all these fancy graphics, text based games were a very popular genre. Rather than move a character on the screen, you’d type out commands for your player in sentence form which the game would interpret; decades before the “cloud” language processing technology that the likes of Amazon and Google currently use to power their virtual assistants. In some ways the genre was ahead of its time, but it didn’t survive the graphical revolution for home computers. Of course, these games still have some diehard fans out there.

[Dan The Geek] is one such fan. He loves text based adventure games like Zork so much that he wanted to create his own implementation of the core technology that made these games possible all those years ago. But he didn’t want to just do it on this desktop computer, there’s already projects that let you run these classic games on modern hardware. He wanted to see if he could run these classic games on a modern microcontroller, and create a authentic retro experience on a handy portable device.

[Dan] starts by explaining the technology used to make titles like these possible in the days when the wide array of home computer types required a nuanced approach. By separating the story files from the actual interpreter, developers could more easily port the games to various computers. In theory these interpreters, known as “Z-machines”, could be written for any computer that could compile C code, had enough RAM to hold the story, and had a terminal and keyboard. Not exactly the kind of system requirements we’re used to seeing for modern PC games, but it was the 1980’s.

In theory a modern microcontroller will meet these requirements, so [Dan] wanted to create his own Z-machine for one. But rather than “cheat” by using an SD card like previous Arduino Z-machines have, he wanted to see if there was a development board out there that could do it all internally. The answer came in the form of the  Adafruit ItsyBitsy M4 Express, with its 192 kB of RAM and 2 MB of SPI flash.

The Z-machine created by [Dan], which he’s calling A2Z, allows users to run Zork and other compatible interactive text games on the ItsyBitsy without any additional hardware. Just plug the board into your computer and you’ll be able to play the games over the the serial connection. He’s even implemented some retro color schemes to make the experience more authentic, like the blue of the Amiga or Compaq green.

We’ve covered previous projects that brought Zork and friends to the Arduino, your web browser via a virtual Altair 8800, and even some more exotic targets like custom FPGAs. You can play cave adventure, the game that inspired Zork, on the Supercon Badge.

Before computer games had all these fancy graphics, text based games were a very popular genre. Rather than move a character on the screen, you’d type out commands for your player in sentence form which the game would interpret; decades before the “cloud” language processing technology that the likes of Amazon and Google currently use to power their virtual assistants. In some ways the genre was ahead of its time, but it didn’t survive the graphical revolution for home computers. Of course, these games still have some diehard fans out there.

[Dan The Geek] is one such fan. He loves text based adventure games like Zork so much that he wanted to create his own implementation of the core technology that made these games possible all those years ago. But he didn’t want to just do it on this desktop computer, there’s already projects that let you run these classic games on modern hardware. He wanted to see if he could run these classic games on a modern microcontroller, and create a authentic retro experience on a handy portable device.

[Dan] starts by explaining the technology used to make titles like these possible in the days when the wide array of home computer types required a nuanced approach. By separating the story files from the actual interpreter, developers could more easily port the games to various computers. In theory these interpreters, known as “Z-machines”, could be written for any computer that could compile C code, had enough RAM to hold the story, and had a terminal and keyboard. Not exactly the kind of system requirements we’re used to seeing for modern PC games, but it was the 1980’s.

In theory a modern microcontroller will meet these requirements, so [Dan] wanted to create his own Z-machine for one. But rather than “cheat” by using an SD card like previous Arduino Z-machines have, he wanted to see if there was a development board out there that could do it all internally. The answer came in the form of the  Adafruit ItsyBitsy M4 Express, with its 192 kB of RAM and 2 MB of SPI flash.

The Z-machine created by [Dan], which he’s calling A2Z, allows users to run Zork and other compatible interactive text games on the ItsyBitsy without any additional hardware. Just plug the board into your computer and you’ll be able to play the games over the the serial connection. He’s even implemented some retro color schemes to make the experience more authentic, like the blue of the Amiga or Compaq green.

We’ve covered previous projects that brought Zork and friends to the Arduino, your web browser via a virtual Altair 8800, and even some more exotic targets like custom FPGAs. You can play cave adventure, the game that inspired Zork, on the Supercon Badge.

If you are used to coding with almost any modern tool except the Arduino IDE, you are probably accustomed to having on-chip debugging. Sometimes having that visibility inside the code makes all the difference for squashing bugs. But for the Arduino, most of us resort to just printing print statements in our code to observe behavior. When the code works, we take the print statements out. [JoaoLopesF] wanted something better. So he created an Arduino library and a desktop application that lets you have a little better window into your program’s execution.

To be honest, it isn’t really a debugger in the way you normally think of it. But it does offer several nice features. The most rudimentary is to provide levels of messaging so you can filter out messages you don’t care about. This is sort of like a server’s log severity system. Some messages are warnings and some are informational, and some are verbose. You can select what messages to see.

In addition, the library timestamps the messages so you can tell how much time elapsed between messages and what function you were in during the message. It can also examine and set global variables that you preconfigure and set watches on variables. It is also possible to call functions from the serial monitor.

There’s a companion Java program (see video below) although you can use most of the features directly from the normal serial monitor, it just isn’t as pretty. The Java program can also read an Arduino program file and convert all the print calls in it to use the library, if you like.

As you might expect, this requires some cooperation from your program. You have to set up the library and the serial port. You also have to arrange for the main function to run frequently (for example, in the main loop). By default, the debugging is mostly suppressed (although you can change that). You have to issue a serial port command to turn on higher level logging and debug functions.

If you start with the examples that come with the library (use the simple one for an AVR-based Arduino and the advanced one for any others), you’ll see a few #defines you can use to control the library:

  • DEBUG_DISABLED – Set to true and the library compiles out with no overhead
  • DEBUG_DISABLE_DEBUGGER – Turn off everything but message logging
  • DEBUG_INITIAL_LEVEL – Starting level of debug messages
  • DEBUG_USE_FLASH_F – Store debug messages in flash memory

There’s really two versions of the code: one for 8-bit AVR processors and another for other Arduino types. We found problems building both of them. The files src/utility/Fields.cpp, src/utility/Vector.h, and
src/utility/Util.cpp refer to arduino.h. That works on computers that have case-insensitive file systems. In each case, for Linux, it needs to be Arduino.h. In addition, SerialDebug.cpp is lacking a stdarg.h include. We’ve reported both of these issues to the developer so they may be fixed by now.

You can explore the video and the documentation to see how it all works. Is it a full-blown debugger? No. You can’t stop execution (odd, because you certainly could technically), set breakpoints, or single step. But it still useful to have access to at least some of your program’s internal state.

Of course, Arduino has promised full debugging soon. We’ve even seen one Arduino debugging another via debugWIRE.

Amazon might not be happy about it, but at least part of the success of their Fire TV Stick was due to the large hacking and modification scene that cropped up around the Android-powered device. A quick search on YouTube for “Fire Stick Hack” will bring up a seemingly endless array of videos, some with millions of views, which will show viewers how to install unofficial software on the little media dongle. Now it looks like their latest media device, the Fire TV Cube, is starting to attract the same kind of attention.

The team at [Exploitee.rs] has recently taken the wraps off their research which shows the new Fire TV Cube can be rooted with nothing more than an Arduino and an HDMI cable you’re willing to cut apart. Of course, it’s a bit more complicated than just that, but between the video they’ve provided and their WiKi, it looks like all the information is out there for anyone who wants to crack open their own Cube. Just don’t be surprised if it puts you on the Amazon Naughty List.

The process starts by putting the device’s Amlogic S905Z into Device Firmware Upgrade (DFU) mode, which is done by sending the string “boot@USB” to the board over the HDMI port’s I2C interface. That’s where the HDMI cable comes in: you can cut into one and wire it right up to your Arduino and run the sketch [Exploitee.rs] has provided to send the appropriate command. Of course, if you want to get fancy, you could use an HDMI breakout board instead.

With the board in DFU mode in you gain read and write access to the device’s eMMC flash, but that doesn’t exactly get you in because there’s still secure boot to contend with. But as these things tend to go, the team was able to identify a second exploit which could be used in conjunction with DFU mode to trick the device into disabling signature verification. Now with the ability to run unsigned code on the Fire TV Cube, [Exploitee.rs] implemented fastboot to make it easier to flash their custom rooted firmware images to the hardware.

As with the Fire TV Stick before it, make sure you understand the risks involved when you switch off a device’s security features. They’re often there to protect the end user as much as the manufacturer.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook