Posts | Comments

Planet Arduino

Archive for the ‘Visual Basic’ Category

There’s an iconic scene from the movie Big where [Tom Hanks] and [Robert Loggia] play an enormous piano by dancing around on the floor-mounted keys. That was the first thing we thought of when we saw [jegatheesan.soundarapandian’s] PC joystick rug. His drum playing (see the video below) wasn’t as melodious as [Hanks] and [Loggia] but then again they probably had a musical director.

At the heart of the project is, of course, an Arduino. An HC-05 provides a Bluetooth connection back to the PC. We thought perhaps an Arduino with USB input capability like the Leonardo might be in use, but instead, [jegatheesan] has a custom Visual Basic program on the PC that uses SendKeys to do the dirty work.

The switches are more interesting made with old CDs, foil, and sponges. The sponge holds the CDs apart until you step on them and the foil makes the CDs conductive. He uses a lot of Fevicol in the project–as far as we can tell, that’s just an Indian brand of PVA glue, so Elmer’s or any other white glue should do just as well.

The glue also handles the fabric parts. When a project says “no sewing” we realize how some people feel about soldering. The CD/foil/sponge switches might be useful in other contexts. We’d be interested in how the sponges wear with prolonged use.

We’ve seen other giant controllers before. Of course, if you really want a big controller, you can’t beat a Nissan (the link is dead, but the video will give ou the idea).


Filed under: Arduino Hacks

A large installed base of powered speakers from a defunct manufacturer and a dwindling supply of working remote controls. Sounds like nightmare fuel for an AV professional – unless you take matters into your own hands and replace the IR remotes with an Arduino and custom software.

From the sound of it, [Steve]’s crew was working on AV gear for a corporate conference room – powered speakers and an LCD projector. It was the speakers that were giving them trouble, or rather the easily broken or lost remotes. Before the last one gave up the ghost, [Steve] captured the IR codes for each button using an Arduino and the IRRemote library. With codes in hand, it was pretty straightforward to get the Nano to send them with an IR LED. But what makes this project unique is that the custom GUI that controls the Arduino was written in the language that everyone loves to hate, Visual Basic. It’s a dirty little secret that lots of corporate shops still depend on VB, and it’s good to see a little love for the much-maligned language for a change. Plus it got the job done.

Want to dive deeper into IR? Maybe this primer on cloning IR remotes with an Arduino will help. And for another project where VB shines, check out this voice controlled RGB LED lamp.


Filed under: Arduino Hacks
Nov
28

The Game of NIM

arduino hacks, game of NIM, NIM AI, Visual Basic Comments Off on The Game of NIM 

game of nim

[Greg] has been fascinated with the Game of NIM ever since he was a freshman in highschool. Recently he remembered it and decided to try his hand at making an AI version to play, written using Visual Basic.

If you’re not familiar with the game, it’s fairly simple. Each row of lights represents a certain type of object. The players make take as many objects from any one row, per turn. The player with the last object loses.

Now, as you can imagine, writing an AI into a game can be a rather challenging ordeal. [Greg's] first attempt was to use a memory structure that captures every possible move. There’s only 15 moves, and 1 to 7 lights, and the options decrease as the game goes on so… That can’t be too bad, right? Upon running his freshly written code he got an out-of-memory error. Not just any out-of-memory error either, over an Exabyte of memory was needed! Whoops.

He eventually figured the proper code out, and what resulted in game play was a very interesting experience. You see, the computer learns from each game played. At first, it’s like playing a young child — easy to trick and beat. But as the games progressed, the computer picked up his patterns and never made the same mistake again. He simply lost track of the number of games he played with it, but it just kept getting better at better. Must be pretty satisfying to make something that learns from you — kind of like parenthood…

Anyway, [Greg] has an awesome writeup available on his blog, so you should definitely check it out — we can only summarize so much! Stick around after the break to see a video of the game in action.


Filed under: Arduino Hacks


  • 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