I modified the Arduino MultiSerial example to send a MIDI signal when data is sent from the computer, and I was pleasantly surprised to hear sound immediately, although the volume was a bit low. I discovered that the battery board lacked a boost circuit to convert the battery to 5V, so I grabbed a small boost converter from my stock. As I made these adjustments, I updated my button reading code to trigger a MIDI note when I moved the paddle for functionality testing.
I was almost done with the guitar's internals but had a few more tasks on the inside. After installing a couple of step-up converters, I discovered that swapping the batteries resolved one issue. However, when I connected the high-current board to the guitar's power switch, the Arduino failed to power up, and the speakers emitted static. I secured the components with double-sided tape and called it a night.
I planned for programming by listing inputs and outputs and assigning their functions. I prioritized critical controls for the push buttons and will control the rest through the screen and D-pad.
I kept building the code. I started with my earlier sketch that read from both IO expanders and added the drivers for the OLED screen. I reported the IO expander input activity on the screen in hexadecimal.
I created three arrays to monitor the buttons. One array stored the button states, so if a button moved, I knew I pressed or released it. This format had the advantage of acting only when I did something instead of repeatedly acting whenever I held a button.
I programmed the Arduino to calculate new notes when I raised or lowered the paddle based on which colored button I held on the guitar neck. If I pressed the green button, the farthest up, it would change dramatically, but if I pushed the nearby orange button, it would change subtly.
The rest of the summary posts have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Completed projects from year 9
Completed projects from year 10
Completed projects from year 11
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
Triggering MIDI notes |
I was almost done with the guitar's internals but had a few more tasks on the inside. After installing a couple of step-up converters, I discovered that swapping the batteries resolved one issue. However, when I connected the high-current board to the guitar's power switch, the Arduino failed to power up, and the speakers emitted static. I secured the components with double-sided tape and called it a night.
Secured components and more wires than ever |
I planned for programming by listing inputs and outputs and assigning their functions. I prioritized critical controls for the push buttons and will control the rest through the screen and D-pad.
Programming plans on paper |
I kept building the code. I started with my earlier sketch that read from both IO expanders and added the drivers for the OLED screen. I reported the IO expander input activity on the screen in hexadecimal.
Screen displaying inputs from both IO expanders |
I created three arrays to monitor the buttons. One array stored the button states, so if a button moved, I knew I pressed or released it. This format had the advantage of acting only when I did something instead of repeatedly acting whenever I held a button.
Button states only get reported when they change |
I programmed the Arduino to calculate new notes when I raised or lowered the paddle based on which colored button I held on the guitar neck. If I pressed the green button, the farthest up, it would change dramatically, but if I pushed the nearby orange button, it would change subtly.
Changing notes and playing tones |
The rest of the summary posts have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Completed projects from year 9
Completed projects from year 10
Completed projects from year 11
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
Comments
Post a Comment