Hacking IBeacons For Automating Routines

Every self-respecting hacker has an automation hack somewhere in his/her bag of tricks. There are a lot of modern-day technologies that facilitate the functionality like GPS, scripting apps, and even IFTTT. In an interesting hack, [Nick Lee] has combined iBeacons and a reverse engineered Starbucks API to create an automated morning routine.

By creating a mobile app that scans for iBeacons, [Nick Lee] was able to reduce the effort made every morning while heading to his office. When the app encounters a relevant beacon, a NodeJS app sitting in the cloud is triggered. This consequently leads to desired actions like ordering an Uber ride and placing an order for an iced latte.

[Nick Lee] shares the code for the Starbucks application on GitHub for anyone who wants to order their favorite cup of joe automatically. This project can be easily expanded to work with GPS or even RFID tags and if you feel like adding IoT to a coffee machine, you could automate all of your beverage requirements in one go.

Best Product Entry: Emulating Memory

For this year’s Hackaday Prize, we’re giving everyone the opportunity to be a hardware startup. This is the Best Product portion of the Hackaday Prize, a contest that will award $30,000 and a residency in our Design Lab to the best hardware project that is also a product.

Imagine all the memory chips in all the landfills in the world. What if we could easily recover those hosed motherboards and swap out ROM files on malware-damaged chips. That’s the promise of [Blecky]’s EEPROM/Flash Emulator project on Hackaday.io. This project seeks to be the ultimate memory interface, emulating SPI-interface EEPROM or Flash memory chipsets with ease. It can also be used as a security device, checking the BIOS for untoward changes.

The EEEmu packs an Atmel SAM4S Cortex-M4 processor-based microcontroller, an SD card reader, a micro USB for reprogramming, boost converter, voltage regulator, and includes additional 3.3V GPIO/I2C ports, all on a wee 51.5x20mm circuit board. Version 2 is slated to include more features to facilitate use as a normal micro controller: more GPIO pins, USB voltage monitoring, and high-Z control for SPI output.

EEEmu is completely open source, with [Blecky] sharing his code on GitHub and even has created an EEEmu Fritzing part, also found in his repository.

Ask Hackaday: Selling Yourself As A Hacker

While there are plenty of hackers that hack just for the love of it, it’s no secret that many of us are looking to hit it big someday. Tales of the businesses like HP and Apple that started in someone’s garage inevitably lead to musings like, “Hey, I’ve got a garage!” and grand plans to turn that special idea into the Next Big Thing™. Many will try, most will fail for one reason or another, but hope springs eternal, and each new widget seems to start the entrepreneurial cycle again.

But for as much pressure as we may feel to be the next Packard, Wozniak, or Musk, not everyone is cut out to be the boss. Some of us have no interest in or aptitude for business — we don’t want to hire or fire people, we don’t want to wheel and deal, and we certainly don’t want to worry about salesmanship. Some of us just want to abstract all that complexity away and just find a job, preferably one that leverages the things we love to do.
Continue reading “Ask Hackaday: Selling Yourself As A Hacker”

Completely Owning The Dreamcast Add-on You Never Had

If you’ve got a SEGA Dreamcast kicking around in a closet somewhere, and you still have the underutilized add-on Visual Memory Unit (VMU), you’re in for a treat today. If not, but you enjoy incredibly detailed hacks into the depths of slightly aged silicon, you’ll be even more excited. Because [Dmitry Grinberg] has a VMU hack that will awe you with its completeness. With all the bits in place, the hacking tally is a new MAME emulator, an IDA plugin, a never-before ROM dump, and an emulator for an ARM chip that doesn’t exist, running Flappy Bird. All in a month’s work!

The VMU was a Dreamcast add-on that primarily stored game data in its flash memory, but it also had a small LCD display, a D-pad, and inter-VMU communications functions. It also had room for a standalone game which could interact with the main Dreamcast games in limited ways. [Dmitry] wanted to see what else he could do with it. Basically everything.

We can’t do this hack justice in a short write-up, but the outline is that he starts out with the datasheet for the VMU’s CPU, and goes looking for interesting instructions. Then he started reverse engineering the ROM that comes with the SDK, which was only trivially obfuscated. Along the way, he wrote his own IDA plugin for the chip. Discovery of two ROP gadgets allowed him to dump the ROM to flash, where it could be easily read out. Those of you in the VMU community will appreciate the first-ever ROM dump.

On to doing something useful with the device! [Dmitry]’s definition of useful is to have it emulate a modern CPU so that it’s a lot easier to program for. Of course, nobody writes an emulator for modern hardware directly on obsolete hardware — you emulate the obsolete hardware on your laptop to get a debug environment first. So [Dmitry] ported the emulator for the VMU’s CPU that he found in MAME from C++ to C (for reasons that we understand) and customized it for the VMU’s hardware.

Within the emulated VMU, [Dmitry] then wrote the ARM Cortex emulator that it would soon run. But what ARM Cortex to emulate? The Cortex-M0 would have been good enough, but it lacked some instructions that [Dmitry] liked, so he ended up writing an emulator of the not-available-in-silicon Cortex-M23, which had the features he wanted. Load up the Cortex emulator in the VMU, and you can write games for it in C. [Dmitry] provides two demos, naturally: a Mandlebrot set grapher, and Flappy Bird.

Amazed? Yeah, we were as well. But then this is the same guy emulated an ARM chip on the AVR architecture, just to run Linux on an ATMega1284p.

Conventional Current Vs. Electron Current

Electric current comes in many forms: current in a wire, flow of ions between the plates of a battery and between plates during electrolysis, as arcs, sparks, and so on. However, here on Hackaday we mostly deal with the current in a wire. But which way does that current flow in that wire? There are two possibilities depending on whether you’re thinking in terms of electron current or conventional current.

Electron current vs. conventional current
Electron current vs. conventional current

In a circuit connected to a battery, the electrons are the charge carrier and flow from the battery’s negative terminal, around the circuit and back to the positive terminal.

Conventional current takes just the opposite direction, from the positive terminal, around the circuit and back to the negative terminal. In that case there’s no charge carrier moving in that direction. Conventional current is a story we tell ourselves.

But since there is such a variety of forms that current comes in, the charge carrier sometimes does move from the positive to the negative, and sometimes movement is in both directions. When a lead acid battery is in use, positive hydrogen ions move in one direction while negative sulfate ions move in the other. So if the direction doesn’t matter then having a convention that ignores the charge carrier makes life easier.

Saying that we need a convention that’s independent of the charge carrier is all very nice, but that seems to be a side effect rather than the reason we have the convention. The convention was established long before there was a known variety of forms that current comes in — back even before the electron, or even the atom, was discovered. Why do we have the convention? As you’ll read below, it started with Benjamin Franklin.

Continue reading “Conventional Current Vs. Electron Current”

PLC Vs Arduino Show Down

Hackaday readers don’t need an introduction to the Arduino. But in industrial control applications, programmable logic controllers or PLCs are far more common. These are small rugged devices that can do simple things like monitor switches and control actuators. Being ruggedized, they are typically reasonably expensive, especially compared to an Arduino. [Doug Reneker] decided to evaluate an Arduino versus a PLC in a relatively simple industrial-style application.

The application is a simple closed-loop control of flow generated by a pump. A sensor measures flow for the Arduino, which adjusts a control valve actuator to maintain the specified setpoint. The software uses proportional and integral control (the PI part of a PID loop).

Continue reading “PLC Vs Arduino Show Down”

The Cheapest Meter On Banggood

According to [pileofstuff], he didn’t really need another digital multimeter. However, when he saw a DT-832 meter on Banggood for the princely sum for $4.99 he wondered just what kind of meter you’d get for that price. You can see his conclusions in his recent video (below). He does make it clear, by the way, that he wasn’t paid for the review or given the meter. He just decided to see what $5 would buy in a meter.

Depending on your predisposition to cheap Asian electronics, you may or may not be surprised. After all, for $5 you can’t expect a top-of-the-line lab instrument. The device measures AC and DC voltage, DC amperage, ohms, transistor beta, and has a diode tester and continuity buzzer. It also has some frequency measurement capability. You can’t be too surprised it doesn’t auto range, though. To be fair, although he mentions Banggood as the source of the meter, a quick Google search shows you can get them from all the usual sources, and the price is down to $3.73 as long as you let them ship it from Canada.

Continue reading “The Cheapest Meter On Banggood”