USB Hacking to MIDI Out 5 Dins Keyboard

The USBDroid provides USB Host functionality for use as an Android peripheral as an Open Android Development Kit board. [Product page]
Post Reply
masreg
Posts: 4
Joined: Fri Jul 04, 2014 7:47 am

USB Hacking to MIDI Out 5 Dins Keyboard

Post by masreg » Fri Jul 04, 2014 7:57 am

I am a totally newbie and keen to learn.

Based on "Collin's Lab USB Hacking with Arduino" video dated November 30th, 2010, I am really inspired to build this device. But some of the parts have discontinued.

http://www.youtube.com/watch?v=kfCDjwHBBuM

#1. The USB host shield has been discontinued - http://www.circuitsathome.com/products- ... r-arduino/. So I have to get the current replacement - USB host shield v2.0 - http://www.circuitsathome.com/products- ... assembled/. It will also require an Arduino Uno board as the micro controller.

After reading your product specification, May I use Freetronics USBDroid (with USB host built-in) by Freetronics http://www.freetronics.com/products/usb ... 7Yn-I2SxD0 for this project?

#2. I downloaded the sketch code http://cdn.makezine.com/make/2010/12/LP ... 01203a.zip and paste it to latest Arduino IDE v1.0.5 under OS X and clicked "verify". There was an error on line

Code: Select all

EP_RECORD ep_record[ LPK25_NUM_EP ];  //endpoint record structure for the LPK25 controller
the error message said

Code: Select all

"EP_RECORD" does not name a type.
Note: In this scenario, I do not have any Arduino board yet (But I'm planning to get one), I have installed Arduino IDE software. Where did I go wrong? See below:

Image

#3 I notice the file extension of latest Arduino v1.0.5 is .ino. The sketch file suffix downloaded above is .pde. Am I downloading the right file? Does Arduino IDE changed user's sketch file extension lately?

Any guidance/explanation would be much appreciated to plan this project properly.

Thank you.

masreg
Posts: 4
Joined: Fri Jul 04, 2014 7:47 am

Re: USB Hacking to MIDI Out 5 Dins Keyboard

Post by masreg » Sat Jul 05, 2014 1:27 am

http://forum.arduino.cc/index.php?PHPSE ... c=253119.0
Grumpy_Mike mentioned the latest USB shield R3 with more devices support.

Game controllers: Sony PS3, Nintendo Wii, Xbox360.
USB to serial converters: FTDI, PL-2303, ACM, as well as certain cell phones and GPS receivers.
ADK-capable Android phones and tables.
Digital cameras: Canon EOS, Powershot, Nikon DSLRs and P&S, as well as generic PTP.
Mass storage devices, such as USB sticks, memory card readers, external hard drives.
Bluetooth dongles.

Does Freetronics USBDroid http://www.freetronics.com/products/usb ... 7Yn-I2SxD0 sufficient for USB Hacking -> MIDI Out task?

Isn't the compatibility factor based on the code we write?

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: USB Hacking to MIDI Out 5 Dins Keyboard

Post by andrew » Sat Jul 05, 2014 8:44 am

It comes down to the code, both the Arduino USB host shield and the USBDroid use the same MAX3421 USB host controller IC.

masreg
Posts: 4
Joined: Fri Jul 04, 2014 7:47 am

Re: USB Hacking to MIDI Out 5 Dins Keyboard

Post by masreg » Sun Jul 06, 2014 5:07 am

Hi John, I found a sketch file that close to what I need.

http://forums.adafruit.com/download/file.php?id=16418

I followed its header instructions, I have copy-pasted the legacy USB host library and I used Arduino IDE version 0023 software. The error compiling is below:

Are you able to help where I went wrong?

Code: Select all

Compiling LPK_Mini...
Creating ~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp.o...
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:115: error: 'EP_RECORD' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:120: error: 'byte' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:123: error: 'byte' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:125: error: 'MAX3421E' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:126: error: 'USB' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void setup()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:138: error: 'INPUT' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:138: error: 'pinMode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:139: error: 'LOW' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:139: error: 'digitalWrite' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:144: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:146: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:148: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:149: error: 'CHANGE' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:149: error: 'attachInterrupt' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:150: error: 'Max' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void loop()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:156: error: 'Max' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:157: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:167: error: 'USB_STATE_CONFIGURING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:168: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:170: error: 'USB_STATE_RUNNING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:172: error: 'USB_STATE_RUNNING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:173: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void LPK25_init()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:181: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:181: error: expected `;' before 'rcode'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:182: error: expected `;' before 'i'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:185: error: 'ep_record' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:185: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:190: error: 'bmSNDTOG0' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:191: error: 'bmRCVTOG0' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:202: error: 'rcode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:205: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:206: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:212: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:213: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:243: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:244: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:263: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:264: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:269: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:274: error: 'delay' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void LPK25_poll()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:280: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:280: error: expected `;' before 'rcode'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'rcode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'ep_record' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:284: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:284: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void process_report()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:293: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:293: error: expected `;' before 'i'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:294: error: 'i' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:300: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:305: error: 'outBuf' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:310: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:311: error: 'BIN' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:324: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:327: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:331: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:331: error: 'BIN' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:335: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: At global scope:
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:350: error: 'boolean' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void serialInterrupt()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:359: error: 'inService' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:362: error: 'inService' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:365: error: 'interrupts' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:368: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:371: error: 'midiByte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:371: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:372: error: 'outBuf' was not declared in this scope

masreg
Posts: 4
Joined: Fri Jul 04, 2014 7:47 am

Re: USB Hacking to MIDI Out 5 Dins Keyboard

Post by masreg » Sun Jul 06, 2014 5:10 am

Hi John,

Sketch file: http://forums.adafruit.com/download/file.php?id=16418
Arduino IDe version 0023
Legacy USB Host library: https://github.com/felis/USB_Host_Shield/tree/dev

Can you please help me?

Compiling error message is:

Code: Select all

Compiling LPK_Mini...
Creating ~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp.o...
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:115: error: 'EP_RECORD' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:120: error: 'byte' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:123: error: 'byte' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:125: error: 'MAX3421E' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:126: error: 'USB' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void setup()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:138: error: 'INPUT' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:138: error: 'pinMode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:139: error: 'LOW' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:139: error: 'digitalWrite' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:144: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:146: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:148: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:149: error: 'CHANGE' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:149: error: 'attachInterrupt' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:150: error: 'Max' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void loop()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:156: error: 'Max' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:157: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:167: error: 'USB_STATE_CONFIGURING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:168: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:170: error: 'USB_STATE_RUNNING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:172: error: 'USB_STATE_RUNNING' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:173: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void LPK25_init()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:181: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:181: error: expected `;' before 'rcode'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:182: error: expected `;' before 'i'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:185: error: 'ep_record' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:185: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:190: error: 'bmSNDTOG0' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:191: error: 'bmRCVTOG0' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:202: error: 'rcode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:205: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:206: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:212: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:213: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:243: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:244: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:263: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:264: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:269: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:274: error: 'delay' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void LPK25_poll()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:280: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:280: error: expected `;' before 'rcode'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'rcode' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'Usb' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:282: error: 'ep_record' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:284: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:284: error: 'HEX' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void process_report()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:293: error: 'byte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:293: error: expected `;' before 'i'
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:294: error: 'i' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:300: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:305: error: 'outBuf' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:310: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:311: error: 'BIN' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:324: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:327: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:331: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:331: error: 'BIN' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:335: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: At global scope:
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:350: error: 'boolean' does not name a type
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp: In function 'void serialInterrupt()':
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:359: error: 'inService' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:362: error: 'inService' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:365: error: 'interrupts' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:368: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:371: error: 'midiByte' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:371: error: 'Serial' was not declared in this scope
~/_hidden_path_/LPK_Mini/LPK_Mini.ino.cpp:372: error: 'outBuf' was not declared in this scope

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests