Author Options:

Conflict with a USB Host and Writing to an LCD Screen? Answered


I've been trying to learn Arduino for my Computer Science and Engineering Class and have been inventing projects for myself during more boring classes.

As of late I've been experimenting with audio and making an Xbox controller into an instrument. The four face and shoulder/trigger buttons are a scale while the analog stick up and down are octaves and side to side is sharp. Another feature I've been working on is using an LCD screen to display the key the controller is set to (where each button is given a key signature value and turns sharp or flat respectively after a certain value).

The issue is that there is a specific line of code that makes the 16x2 LCD Screen readout flip out:

if(Usb.Init() == -1){}

Accessing this code (and I have done trial after trial to narrow it down to just this section) seems to make the LCD screen output random, yet consistent under different constraints, garbage. Meanwhile, without this line of code that is required for the controller to connect the screen works perfectly. So for me so far it's either have the input or have the display, I can't seem to have both be operational.

Is there an issue with the LCD or Xbox Controller USB library?

If you have any potential leads or ideas to help me it would be highly appreciated!

It appears like I might just have to move on and work on other ideas...

[Don't know if the photos are much help >.< First page of code, the set-up, is I believe where the error lies]

1 Replies

bekathwiaBest Answer (author)2017-02-24

Hi, unfortunately I cannot provide individual project help outside the scope of the class lessons. Thanks for understanding!

Select as Best AnswerUndo Best Answer