Profiling An Arduino

profiling

In proper, high-dollar embedded development environments – and quite a few free and open source ones, as well – you get really cool features like debugging, emulation, and profiling. The Arduino IDE doesn’t feature any of these bells a whistles, so figuring out how much time is spent in one section of code is nigh impossible. [William] came up with a clever solution to this problem, and while it doesn’t tell you exactly how much time is spent on a specific line of code, it’s still a good enough tool to be a great help in optimization.

[William]’s solution is to create a ‘bin’ for arbitrary chunks of code – one for each subroutine or deeply nested loop. When the profiler run, you end up with a histogram of how much time is spent per block of code. This is done with an interrupt that runs at about 1 kHz, with macros sprinkled around the code. Each time the interrupt ticks, the macro runs and increases a counter by one. Let the sketch run for a minute or so, and you get an idea of how much time is spent in a specific area of code.

It’s a bit of a kludge, but when you’re dealing with extremely minimal tools, any sort of help in debugging is sorely needed and greatly appreciated.

 

 

Opensource RhinoBOT Is Well Suited For Hacking And Sumo-Robotics!

RhinoBOT

The RhinoBOT is an open source and 3D printed robot that is fun to build and easy to expand. It can be used for educational purposes or even as a sumobot!

[Miguel Carro] runs a DIY robotics blog at bq.com (Spanish — Translated) to help teach kids about robotics using a fun cartoon character named Andy. He’s released all the design files for his latest printbot, the RhinoBOT on thingiverse.com. Using an Arduino UNO, an IR sensor, two rotational servos, an LED, batteries and a few pieces of hardware, you can build your very own RhinoBOT! That is — if you have a 3D printer.

The fun doesn’t stop there though, as [Miguel’s] also created a phone app to let you control your RhinoBOT wirelessly!  And since not all the outputs on the UNO are used, y0u can add extra functionality with a bit of creativity — how about being able to move that dozer! To see what it can do, and to start thinking about what you could do with it, stick around after the break to see it in action!

Continue reading “Opensource RhinoBOT Is Well Suited For Hacking And Sumo-Robotics!”

The Arduino Operating System

WGPIOhile Arduino and its libraries are the quickest way to interface with a sensor and blink an LED, sometimes you shouldn’t have to write and compile code to do something exceptionally simple. [Oliver] realized most of the overly simple functions of a microcontroller could be done from a command line running on that microcontroller and came up with the MiniPirate, the Arduino command line tool.

The MiniPirate is just a sketch compiled on the Arduino that allows pins to be set high or low, set a PWM value, or reading and writing I2C bytes. It’s basically an extremely slimmed down version of the Bus Pirate meant for extremely simple modifications of circuits and peripherals.

[Oliver] demos his MiniPirate by taking a DS1307 real-time clock, wiring up the I2C bus, and writing values to set the time. It’s a very simple implementation meaning he needs to write everything in hex, but it’s still easy enough to find a use in many other projects.

HexDrake — A Low Cost 2-DOF Hexapod

hexdrake low cost hexapod

[David’s] been making robots since he was 16. After conquering the basics, he wanted to build something a bit more interesting than a simple wheeled-robot — he wanted to buy a hexapod but they were too expensive — so he decided to design his own low-cost version!

It’s made out of hand-cut wood, SG90 servos, an Arduino and a 16-channel servo controller. A 2.4GHz remote control sends commands to the Arduino which then communicates to the USC servo controller, allowing for intricate control of the 14 servos that make up the HexDrake.

He’s also added a few LED arrays for the eyes of his robot, which in the future will be animated to give expression to his little hexapod.

It’s an extremely well built little bot, and [David’s] made a very in-depth Instructable for anyone who would like to follow in his footsteps. Stick around after the break to see it scurry around!

Continue reading “HexDrake — A Low Cost 2-DOF Hexapod”

DIY Multimeter, Arduino Sold Seperately

Arduino-based Multimeter

You can’t argue that Arduinos are extremely popular with the maker/hacker community. Some would say that there is certainly no shortage of projects to make using them. [Milen] thought otherwise and felt it was time to create an Arduino-based multimeter.

At the heart of this project  is a common Arduino Uno. The additional parts were kept to a minimum in order to keep down the overall cost and project complexity. The finished product can measure voltage from 0-100v, amperage up to 500mA and resistance between 0-250 kohm. If you need to check for continuity, it can do that too.

All of the parts required to make the multimeter fit on a shield that plugs directly into the Arduino. Banana plugs allow for attaching test leads. The measurement values are displayed on an LCD screen and/or (if connected) to the Arduino IDE Serial Monitor. If only using the serial monitor, the LCD screen can be omitted to save a few bucks.

Continue reading “DIY Multimeter, Arduino Sold Seperately”

Building A Final Key

Final Key

Remembering passwords is a pain, and there’s a number of devices out there to make it easier. If you’re looking to roll your own, this guide to building a Final Key will walk you through the process.

We talked about the Final Key before. It’s a one button password manager that encrypts and stores your password. It acts as a virtual serial port for configuration. When you hit the button, it becomes a keyboard and types in the correct password.

The creator has no intentions of making this a commercial project for a number of reasons. Instead, easy build instructions are provided based on the Arduino Pro Micro. The 24LC512 EEPROM can be soldered directly to the Arduino by bending out the DIP legs. A few resistors, a button, and an LED finish off the project. The last step is to fill it with hot glue to prevent tampering.

The Final Key firmware is available on Github, and the case can be ordered from Shapeways. If you’re interested in hardware password management, you can also check out the Mooltipass which is being developed on Hackaday.

[Thanks to Lars for the tip!]

Sublime Text As An Arduino IDE

If you’ve played with an Arduino, you’ve probably been frustrated by the IDE. It works, but it’s not the best editor. It’s especially painful for bigger files and larger projects. The Stino plugin for Sublime Text aims to solve this issue by bringing the full functionality of the Arduino IDE to the Sublime Text editor.

Sublime Text is a powerful text editor with support for most programming languages. What it’s missing is support for compiling and uploading code to an Arduino. Stino bridges that gap. Sublime is a commercial product, and retails for $70 USD. However Sublime does have an indefinite trial period, so Stino can be evaluated for free. Stino itself is an open source plugin written in Python, and you can contribute to the project on Github.

After installing Sublime and Stino, you point the plugin at an Arduino install folder. It then allows you to build and flash directly from the editor. For anyone who’s been frustrated with the Arduino IDE, this looks like a slick solution.

[Thanks to Matt for the tip!]