Posts with «arduino» label

Giant Clock Made In the Nick of Time

When [tnjyoung] was asked to build a huge lighted clock for a high school theater’s production of Cinderella with only two weeks before opening night, he probably wished for a fairy godmother of his own to show up and do it for him. But he and his team pulled it off, and it looks amazing. That medallion in the middle? It was laid out painstakingly by hand, using electrical tape.

This thing is 12 feet wide and weighs more than 500 pounds. Even so, it isn’t a permanent set piece, so it has to move up and down throughout the show on airplane cables. Now for the minutiae: there’s an Arduino Uno with built-in Wi-Fi that receives UDP commands from a phone to raise and lower the clock at the appropriate times. The ‘duino is also controlling two stepper motors, one for the hour hand and one for the minute hand.

Time is almost a minor character in the story of Cinderella, since she has to get back by midnight. Because of this, [tnjyoung] programmed a dozen or so time cues that move the steppers at various speeds to achieve different effects, like time flying by as she dances the night away with the Prince. Hour you still just sitting there? Sweep past the break to watch the build process fly by in a matter of minutes.

Got all the time in the world? Make a clock out of clocks. Clocks all the way down.

Casual Tetris Comes In At $9

[Michael Pick] calls himself the casual engineer, though we don’t know whether he is referring to his work clothes or his laid back attitude. However, he does like to show quick and easy projects. His latest? A little portable Tetris game for $9 worth of parts. There is an Arduino Pro Mini and a tiny display along with a few switches and things on a prototyping PC board. [Michael] claims it is a one day build, and we imagine it wouldn’t even be that much.

Our only complaint is that there isn’t a clear bill of material or the code. However, we think you could figure out the parts pretty easy and there are bound to be plenty of games including Tetris that you could adapt to the hardware.

The display looks suspiciously like an SSD1306 display which is commonly cloned. so that answers one question. These are just less than an inch of screen, but if you buy them from China that eats up almost half of the $9 budget. The Arduino is probably another $3. The other parts are cheap, but it is easy to imagine you might exceed $9 by a bit if you try to duplicate this.

Just from looking at the video, the code looks a lot like Tiny Tetris by [AJRussel], though there are a few others out there if you look. The rest should be pretty easy to puzzle out. Maybe [Michael] will add a link to the code, a bill of materials, and some specific wiring instructions.

Of course, if you just want Tetris, grab your transistor tester. We’ve even seen smaller versions of Tetris given away as business cards.

Hack a Day 29 Feb 06:00

A Tetris To Be Proud Of, With Only A Nano

Tetris may have first arrived in the West on machines such as the PC and Amiga, but its genesis at the hands of [Alexey Pajitnov] was on an Electronika 60, a Soviet clone of an early-1970s DEC PDP-11. Thus those tumbling blocks are hardly demanding in terms of processor power, and a game can be implemented on the humblest of hardware. Relatively modern silicon such as the Atmega328 in [c0pperdragon]’s Arduino Nano Tetris console should then have no problems, but to make that assumption is to miss the quality of the achievement.

In a typical home or desktop computer of the 1980s the processor would have been assisted by plenty of dedicated hardware, but since the Arduino has none of that the feat of creating the game with a 288p video signal having four gray scales and with four-channel music is an extremely impressive one. Beside the Nano there are only a few passive components, there are no CRT controllers or sound chips to be seen.

The entire device is packaged within a clone of a NES controller, with the passives on a piece of stripboard beside the Nano. There is a rudimentary resistor DAC to produce the grey scales, and the audio is not the direct PWM you might expect but a very simple DAC created by charging and discharging a capacitor at the video line frequency. The results can be seen and heard in the video below the break, and though we’re sure we’ve heard something like that tune before, it looks to be a very playable little game.

Hack a Day 28 Feb 09:00

Writing Arduino Libraries, An Expert View

The Arduino IDE has a bit of a split personality. On the one hand, it is a simple environment where you can just pick and choose a few libraries, write a few lines of code, and make lots of interesting things. On the other hand, it is also an ecosystem in which many different boards and libraries can be supported. Writing a great library that everyone can easily use takes a little forethought. There is an official style guide, but a recent post by [Nate] from Sparkfun points out lessons learned from writing more libraries than most people.

Of course, as you might expect, some of this is a matter of opinion, and [Nate] admits that. For example, they always use the serial port at 115,200 baud, but they do note that 9,600 baud is also popular. They also suggest making code as readable as possible, which is usually good advice. In the old days, writing terse code might lead to higher efficiency, but with modern compilers, you ought to get a tight final result even when doing things in a pretty verbose fashion.

However, a lot of the advice is very subtle but important. For example, the use of default parameters and the order of parameters. If you add their advice to the official style guide, you should be well on your way to creating really great Arduino libraries.

Of course, you also need a great idea for a library or an improved library that doesn’t already exist. That may be your most difficult task. Sometimes it makes sense to port something over instead of starting from scratch.

MIL-SPEC Keyboard Now Salutes USB

When [easyjo] picked up this late ’80s Marconi mil-spec keyboard for cheap, he knew it wouldn’t be easy to convert it to USB — just that it would be worth it. Spoiler alert: those LEDs aren’t a mod, they’re native. They get their interesting shape from the key traces, which are in the four corners.

Despite having way-cool buttons such as WPNS HOLD, and the fact that Control is on the home row where it belongs, this keyboard does not look fun to type on at all for any length of time. Of course, the point of this keyboard is not comfort, but a reliable input device that keeps out dust, sweat, liquids, and the enemy.

This is probably why the controller is embedded into the underside of the key switch PCB instead of living on its own board.  [easyjo] tried to analyze the signals from the existing 26-pin connector, but it didn’t work out.

So once he was able to decode the matrix, he removed the controller chip and wired the rows and columns directly to an Arduino Leonardo. Fortunately, the LEDs were just a matter of powering their columns from the front side of the board.

The availability of certain kinds of military surplus can make for really interesting modernization projects, like adding POTS to a field telephone.

Via r/duino

An Arduino-enabled observatory dome door opener

The South Florida Science Center recently commissioned a beautiful new 10” aperture refactor telescope. Its dome, however, was opened by hand; so in an effort to modernize this part of the setup, Andres Paris and his brother “patanwilson” added a windshield wiper-style DC motor to automate the process.

The “window to the heavens” is now operated by an Arduino Uno via a high current H-bridge capable of passing along up to 20 amps. User interface is provided by an IR remote control and reed switches stop the door’s motion at the appropriate points. 

A pair of 12V batteries enable the system to move within the dome and the voltage displays — that can be turned off remotely — to show how much power is left.

More details on the project can be found on Reddit.

Arduino Blog 27 Feb 22:21
arduino  uno  

Arm Pelion Device Management comes to the Arduino IoT Cloud

As part of Arduino’s expanding relationship with Arm and continuing commitment to professionals, Arm Pelion Device Management users can now seamlessly use Arduino IoT Cloud to quickly create IoT applications.

Combining the speed of application development of the low-code Arduino IoT Cloud with the secure, scalable lifecycle management features of Arm Pelion Device Management brings the best of both worlds.

The integration enables Pelion Device Management users to import all their resources via the Pelion API and translate them into Arduino IoT Cloud properties. They can see and manage everything in the cloud, with the Arduino IoT interface (web or mobile client) providing the simplicity for designers to focus their efforts on the IoT application, creating control panels and summary dashboards. Scalability is a fundamental of the Pelion Device Management service, and new devices will automatically appear in the Arduino IoT Cloud as soon as they are registered in Pelion.

If you are an existing client of Pelion Device Management and would like to know more about the integration with Arduino IoT Cloud and the professional services available from the Arduino Pro team, please contact us here

Daisy is a tiny $29 computer for building custom musical instruments

Coding your own musical instruments just got a lot more convenient. Music tech company Electrosmith has launched the Daisy, an open source microcomputer packed with everything you need to code your own pedals, synth, modules and instruments -- and it's the size of a stick of gum.

Daisy is a tiny $29 computer for building custom musical instruments

Coding your own musical instruments just got a lot more convenient. Music tech company Electrosmith has launched the Daisy, an open source microcomputer packed with everything you need to code your own pedals, synth, modules and instruments -- and it's the size of a stick of gum.

Source: Kickstarter

OpenAstroTracker is a tracking and GoTo mount for DSLR astrophotography

Stars appear to stand still, but wait a few minutes and they won’t be in quite the same place. This means that if you want to take a long-exposure image of the sky with your DSLR you’ll have to either embrace the streaks, or use tracking hardware to compensate for this movement. Naturally, this specialized equipment can be quite expensive, but a seen here, you can now make your own 3D-printed OpenAstroTracker controlled by an Arduino Uno.

The device features a 16×2 LED display/keypad shield, along with an optional Bluetooth module for interface. When set up, it slowly rotates the camera to compensate for star movements via two steppers on a gimbal assembly. 

Print files for the OpenAstroTracker are available on Thingiverse and code can be found on GitHub if you’d like to examine the design or even build your own. Its creator also plans to sell it as a DIY kit — and you can sign up to be notified when it’s available.

Arduino Blog 26 Feb 14:06