no real progress, it turns out the guitar does not like to have it’s voltage reversed… so i’ve got a new one. the store was kind enough to let me swap it out. other than that testing was going well.
i think i’m getting some kind of interferance with all the serial transmissions going on. serial.print, shiftOut, shiftIn, (potentially PS2), are all getting in the way of the serial communication that needs to be perfect for the midi to work right. I’m getting notes occasionally, but theres gibberish going down the line too.
hopefully i can work out the bugs tonight. i’ll be separating the program into chunks to find where the real problem is. i may not be getting good data from the guitar. maybe hooking it up to 3.3v will help…
after a nice little vacation to virginia beach. I was back to work on the guitar. i spent a few hours on it last night and managed to get quite a bit done. the midi library is almost complete (sending an unspecified value rather than BYTE type was killing me until i found the error). i can send almost whatever i want based on my outline in the user’s manual(which i’ll post as it nears completion). i think i’m going to get a prototype board printed up to make the circuit easier to assemble. i may even offer these for sale based on the interest from the select few who have seen the progress so far.
tonight the plan is to get the guitar library assembled and begin interpreting the wii data and outputing to the lcd. the main program is already set up to send midi output, so that should just fall in line. and i’m continuing to comment every last detail in the files and libraries. i find it really helps me to understand what i am doing. teaching is a great way to learn yourself…
the last pieces of hardware are in the mail (smd leds for the output section). with any luck i’ll be playing a song by the time i go to bed…
no hardware work to speak of due to the release of GTA IV last night and band practice tonight. i have been writing up the readme.txt and some of the midi library i plan on releasing when the project is completed. i’m really doing my best to comment everything so well that my cat could understand what’s going on. i hope this can help out with some other cool projects in the future too.
all this brings me to my main point: editplus is simply the best multi-language text editor i’ve used. its great for everything from java to c++ to html to whatever. you can even add your own language to it. it doesnt code for you, but looks for syntax, spelling, and other errors as well as colors in functions and things similar to the arduino environment. its a great tool that i highly reccomend. its free to try(full version) & $35 to register (program never locks you out, just gives you a nag screen on startup)
for the record i’m not affiliated in any way with editplus.
still being new to arduino and physical computing in general… what was supposed to be the simple task (is anything ever…) of getting the 1×16 lcd up and running in 4bit mode was anything but. i learned a few little nuggets that may be helpful to others in the future. this is for the arduino LCD4Bit library (http://www.arduino.cc/playground/Code/LCD4BitLibrary) and a datavision 16110v1rb-h 1×16 from electronics goldmine.
- starting programming at 11:00 “just while the news is on” will end up in a 2:30am crash
- not all lcds with 16 pin outout are created the same, or operate in the same way. I was getting this wierd problem that i cannot find any other documentation of someone else having and solving.
- Only the first 8 characters would show up (and at full contrast). if i pulled data pin 5 from the lcd and plugged it in while the code was still running, i’d get gibberish, but across all 16 pins and dim. so i knew it was part of the programming. it took some fiddling with the LCD4Bit::init () function to get it to go. it turns out i had to turn on the second line as well as configure some options. trial and error showed these options to be different for both lcd models i have here.
essential in solving that one –> and lcd command library (http://www.iguanalabs.com/lcdinstr.htm)
- it turns out half of my issue is that the board is expecting 5v logic level for all the data and -8v from vcc-vss for the display contrast. i’ll get that squared away tonight.
- when you edit a ______.cpp or _____.h file for arduino, you need to delete the matching _____.o file in order for those changes to be incorporated.
so, where i’m at now – t
he lcd works, but is dim.
the second half starts a position 40, or line 2, pos 0. further changes to LCD4Bit.cpp will be necessary.
some wires need to come off the breadboard before i get confused…
heres the LCD all wired up with a ribbon cable, hot glue added after the picture to secure the cable.
and the breadboard with the boarduino and lcd playing nicely.
below is the quick rundown of what i hope to accomplish and how i intend on doing it. hopefully i’ll be taking pictures and making posts as i progress. to anyone reading this, my code may not be the best, but it will work! i’m certainly open to any help/suggestions/improvements/ideas. now onto the project…
create a midi controller from a wii guitar hero 3 controller.
*4 main control/display points, all with built-in timing pitfalls:
guitar hero controller (I2C)
arduino (brain) (additional control buttons)
1×16 LCD display (4bit serial)
MIDI output (31250 baud serial)
*control scheme needs to be simple yet robust and effective.
resources that will prove invaluable:
Tom Igoe – http://www.tigoe.net/pcomp/code/serial-communication/midi
various bits and pieces from the arduino refernce library and community
some people are great about detailing every part, where it came from and how much it cost. i am not.
RBBB arduino clone ($11) (http://moderndevice.com/RBBB_revB.shtml)
Boarduino for prototyping ($18) (http://www.adafruit.com/index.php?main_page=index&cPath=19)
wii guitar hero controller ($50) (on sale at EB games)
LCD (electronics goldmine) ($2)
spare ribbon cable
resistors, LEDs, wire, solder, etc… (~5-10?)
i have detailed notes all laid out about control scheme and note/fingering structure. once everything gets a little more solid I’ll post some of them up here. off i go then…
this here is my most recent project. until recently i have been a casual tinkerer. an engineer by trade, i enjoy taking things apart and grew up on legos. a friend at work introduced me to the arduino and after lusting after them for a little while i took the plunge.
starting with only a self-taught and 5-year latent c/html/java programming knowledge the way it all works became apparent pretty quickly. it’s way easier than it seemed and i had feared (if youre thinking about it – go ahead and get one. a boarduino is only $18!).
so anyways – this project started because i love pretty lights and pretty colored lights. call it what you will, but i’ve always wanted a way to make a light whatever color and intensity i feel like. being able to build the whole thing is the extra icing.
to create an rgb light capable of lighting a room to a decent level for watching tv/hanging out and a way to control it dynamically. it turns out the arduino seems to have been designed for this! those nice pulse width pins.
since i’m starting this blog with the thing mostly finished heres the features i’ve built in:
-dimming from 10% – 100% by PWM so colors dont shift as they dim.
-a programmable series of colors to fade from one to the next. (currently has to be 10 colors, I’d like to make the number of colors adjustable, but have to re-work some code to do it)
-a hold button to stop the color fade from continuing and then to restart it
-a skip button to jump to the next color in the pattern
-a rotary encoder to change the rgb values while in ‘edit’ mode
-the ability to store the edited colors into the pattern and store the pattern to onboard EEPROM for the next time you turn it on.
-other stuff you can see in the code/video.
i’ll be setting up a flikr account to put all these pictures up shortly.
arduino($38)/boarduino($18)/freeduino RBBB($11) – any are acceptable, the RBBB is the one built into the wall.
150 leds ($21 from ledshoppe)
rotary encoder($1), tact buttons ($.50), 10k micro-pot($.50) from electronics goldmine
wire/solder/various hardware used for installation(~$8)