Show Posts
Pages: [1] 2 3
1  International / Deutsch / Re: Midikeyboard an Arduino Due (USBHost Problem) on: March 16, 2014, 01:42:24 pm
Ich möchte im ersten Schritt "nur" die Midimessages auslesen die das USB-Keyboard ausgibt. Dabei treten die oben beschriebenen Probleme auf. Du hast recht - ich habe nicht explizit erwähnt dass es sich um ein USB Keyboard handelt!
Famose Sachen lassen sich dann mit den Mididaten machen (wenn sie erstmal am Arduino vorliegen). Beispielsweise der schon erwähnte CV Konverter.
2  International / Deutsch / Re: Chars verbinden bzw. Variable nach und nach mittels for-Schleife erstellen on: March 16, 2014, 09:34:30 am
Mir ist noch nicht ganz klar was du erreichen möchtest.
Aber ich habe Folgendes verstanden:
Du willst in der Schleife an einen bestehenden String Zeichen anhängen.
Das geht mittels "concat".
http://arduino.cc/en/Reference/StringConcat#.UyW4eIXN5AY

3  International / Deutsch / Midikeyboard an Arduino Due (USBHost Problem) on: March 16, 2014, 08:00:30 am
Hi!
Ich möchte ein USB-Midikeyboard an den Due anschliessen und die Midinoten auslesen können. Für Musikbegeisterte: Das Ergebnis könnte ein sehr flexibler USB-MIDI zu Control Voltage Konverter sein.

Was bereits klappt:
Ich kann an Enpoint 0 die Beschreibung des Geräts auslesen, ich bekomme alle Werte wie es scheint korrekt übermittelt. Zumindest stimmen Manufacturer und Product.
Sehr hilfreich bis zu diesem Punkt waren für mich folgende Links:
http://www.usbmadesimple.co.uk/index.html //USB für Dummies, eher praktisch orientiert
http://www.beyondlogic.org/usbnutshell/usb1.shtml //USB für Dummies extended, die USB Spezifikation im Schnellgang
http://forum.arduino.cc/index.php?PHPSESSID=ttpp845u9t0ld93dj9adhgt0n6&topic=199608.0 //Auslesen der Geräteeigenschaften
http://www.usb.org/developers/devclass_docs/midi10.pdf //Die USB-Midi Spezifikation

Das Gerät wird folgendermassen beschrieben:
Code:
String Descriptors:
Manufacturer: M-Audio
Product: Oxygen 61

Device Descriptor:
Descriptor Length: 22
Descriptor type: 1
USB version: 100
Device class: 0
Device Subclass: 0
Device Protocol: 0
Max.packet size: 10
Vendor  ID: 763
Product ID: 2028
Revision ID: 100
Mfg.string index: 1
Prod.string index: 2
Serial number index: 0
Number of conf.: 1

Configuration Descriptor:
Length: 9
Descriptor Type: 2
Total length: 65
Num.intf: 2
Conf.value: 1
Conf.string: 0
Attr.: 300
Max.pwr: 100 mA

Interface Descriptor:
Intf.number: 0
Alt.: 0
Endpoints: 0
Class: 1
Subclass: 1
Protocol: 0
Intf.string: 0


Interface Descriptor:
Intf.number: 1
Alt.: 0
Endpoints: 2
Class: 1
Subclass: 3
Protocol: 0
Intf.string: 0

Endpoint Descriptor:
Endpoint address bin: 10000101
Endpoint address dec: 133
Attr.: 2
Max.pkt size: 40
Polling interval: 0

Endpoint Descriptor:
Endpoint address bin: 11
Endpoint address dec: 3
Attr.: 2
Max.pkt size: 40
Polling interval: 0

Jetzt wird es spannend!
Wenn ich es richtig verstanden habe, muss ich dem Gerät an dieser Stelle eine Adresse zuweisen um weitere Transaktionen durchführen zu können. Ich habe mich durch die meisten USBHost Dateien gewühlt und mehrere Funktionen gefunden die laut inline Doku das wohl können.
Ist es korrekt jetzt eine Adresse zuzuweisen? Mit welcher Funktion weise ich Adresse zu?

Ausserdem bin ich auf der Suche nach einem USBHost "best practice". Die Beispiele "KeyboardController" nutzen wohl eine Form von Callbacks. Ich habe leider noch nicht ganz verstanden wie und wo diese Callbacks angemeldet werden können.

Weiß jemand wie es weitergeht? Hat vielleicht schon jemand ein USBHost Tutorial verfasst und ich finde es nicht? Die Referenzseiten geben sich leider etwas spärlich smiley-sad

Viele Grüße!
OptimusPrime


4  Using Arduino / Programming Questions / Re: Arduino IDE 1.5.x, USBHost, and Atmel Software Framework 3.12 on: March 15, 2014, 08:52:24 am
Hi!
I am researching the SAM chip on the Due as well, and fiddeled around with the USBHost lib to read the messages of an Midi Keyboard.
Unfortunately i got stuck when connecting my device to the Arduino. I could read the device properties like manufacturer, interfaces and endpoints, but i couldn't address the device properly and establish a bulk connection.
I digged through most of the files of the USBHost lib, and the inline doc gave me some hints, but i didn't get the missing link.
So i kept reading and researching, and now i stumbled upon your thread.
Did you use the USBHost lib? How did you manage to address your bluetooth dongle? Which functions did you call?

I am quite curious about all this!
You can find my initial post here http://forum.arduino.cc/index.php?topic=217535.msg1589586#msg1589586

Would be great if you drop me some lines!
5  Development / Other Software Development / Due as USBHost for Midikeyboard on: February 13, 2014, 09:05:16 am
Hi,
I'm looking for a way to connect my Midikeyboard (MAudio Oxygen 61) to my Arduino Due via USB. This could end up in an extremly cheap and flexible way to access analog audio gear without the need of expensive analog keyboards.
I already digged into some interesting links i found on the forum and the web, i like to share with you.

http://makezine.com/2010/11/30/usbhacking/ - he already did it! - but i can't access his code.
http://www.beyondlogic.org/usbnutshell/usb1.shtml - how usb works in a nutshell
http://forum.arduino.cc/index.php?PHPSESSID=ttpp845u9t0ld93dj9adhgt0n6&topic=199608.0 - this code gives me quite realistic values.
http://www.usb.org/developers/devclass_docs/midi10.pdf - midi standard explained

Now i have to establish the connection between the due and the keyboard. I already read through the library files of USBHost (Usb.cpp, Usb.h) and tried to understand the magic going on in the MouseController.h / .cpp
I got quite stuck here. What are basically the next steps to go, to access the data from the keyboard?
I experimented a little bit with accessing the endpoints in my device, but i can only configure the standard endpoint 0.

Anyone out there already tried something similar?
Thanks a lot!

[EDIT]
Today i stumbled upon a very interesting link
http://www.usbmadesimple.co.uk/ums_4.htm
Still some help appreciated smiley-wink
6  Using Arduino / Project Guidance / Re: Switching a lot of lightbulbs [SOLVED] on: January 02, 2014, 09:00:59 pm
Hi Guys!
I know it's been a long time - but i always like to see what happens to the projects some people come up with - and i also want to share this with you! This was the solution:
http://sigma-shop.com/category/17/rs485-relays.html

Have fun!


7  Products / Arduino Due / Re: SerialEvent on Due's native USB port never gets fired on: January 01, 2014, 05:47:01 pm
The code is the example "SerialEvent" in "Communication" of your arduino ide.
Basically it is all about getting this to run with the nativeport.

Works with the programming port:
Code:
String inputString = "";         // a string to hold incoming data
boolean stringComplete = false;  // whether the string is complete

void setup() {
  // initialize serial:
  Serial.begin(9600);
  // reserve 200 bytes for the inputString:
  inputString.reserve(200);
}

void loop() {
  // print the string when a newline arrives:
  if (stringComplete) {
    Serial.println(inputString);
    // clear the string:
    inputString = "";
    stringComplete = false;
  }
}

/*
  SerialEvent occurs whenever a new data comes in the
 hardware serial RX.  This routine is run between each
 time loop() runs, so using delay inside loop can delay
 response.  Multiple bytes of data may be available.
 */
void serialEvent() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inChar == '\n') {
      stringComplete = true;
    }
  }
}

Should work with the native port - but SerialEvent is never called:
Code:
String inputString = "";         // a string to hold incoming data
boolean stringComplete = false;  // whether the string is complete

void setup() {
  // initialize serial:
  SerialUSB.begin(9600);
  // reserve 200 bytes for the inputString:
  inputString.reserve(200);
}

void loop() {
  // print the string when a newline arrives:
  if (stringComplete) {
    SerialUSB.println(inputString);
    // clear the string:
    inputString = "";
    stringComplete = false;
  }
}

/*
  SerialEvent occurs whenever a new data comes in the
 hardware serial RX.  This routine is run between each
 time loop() runs, so using delay inside loop can delay
 response.  Multiple bytes of data may be available.
 */
 
////////////////////no magic here
void serialEvent() {
  while (SerialUSB.available()) {
    // get the new byte:
    char inChar = (char)SerialUSB.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inChar == '\n') {
      stringComplete = true;
    }
  }
}
8  Products / Arduino Due / SerialEvent on Due's native USB port never gets fired on: December 20, 2013, 09:34:08 am
Hi Community!
I just tried to modify the example "SerialEvent" in "Communication" to work with the due's native usb port. Everything seems to work out fine, but the SerialEvent is never beeing called. I read through the reference and stumbled upon some threads e.g.  http://forum.arduino.cc/index.php?PHPSESSID=9n0ue2d191td03larfose2vfb0&topic=135011.0 but i didn't find a solution yet to catch this event.
Anyone struggeling with similar issues? Is there another event for the native port (SerialUSBEvent)?

thanks a lot and merry christmas!
9  Products / Arduino Due / Re: Disabling pyserial auto-reset via software change on Arduino DUE on: December 20, 2013, 09:16:56 am
Which USB port do you use? The programming port always resets the arduino when a new serial connection is established. Try using the native port.

best regards
10  Using Arduino / Project Guidance / Re: Switching a lot of lightbulbs on: April 16, 2013, 08:27:45 am
Thanks all of you for your ideas!
Optocouplers could do the job...and hacking led signs for controlling is a quite interesting thought!
11  Using Arduino / Project Guidance / Re: Switching a lot of lightbulbs on: April 14, 2013, 04:11:27 pm
Ouh yeah! Thats quite a lot of interesting stuff here!
CrossRoads:
I am from europe - and we got a new law that prohibits the use of conventional bulbs in home use. The project will be some kind of game, where lightbulbs are used as "pixels". The aim of this work is to seize the prohibition of the lightbulb, and should be a hommage to it. So, i'd totally agree that nobody 'd notice that there are no real lightbulbs used - but it would feel somehow like cheating. The more conventional the used bulbs are, the more the original idea of the work is hit. In my opinion 230V - 60W - glow wire is "conventional".

You already pushed me in an interesting direction with SSR's. I researched some distributors and the price is below the one of normal relays...perhaps this is really the way to go.
I am wondering that nobody buildt someting like that....

Thanks for your input!!!
12  Using Arduino / Project Guidance / Re: Switching a lot of lightbulbs on: April 14, 2013, 01:44:07 pm
I know this sounds fairly stupid...but yes: due to aesthetic reasons lighbulbs are needed.
With leds there are already some convenient solutions, like addressable led stripes...
Do you know any "out of the box" solutions for high brightness leds? In my opinion the high power chips are also difficult to control, because you need a constant current source...
13  Using Arduino / Project Guidance / Switching a lot of lightbulbs on: April 14, 2013, 01:24:12 pm
Hi!
I am tinkering about a project where i need to switch a lot of lightbulbs on and of.
So i searched and found some approaches. A project some of you might already know is Blinkenlights:

Here is some interesting information provided about the setup of blinkenlights http://www.retrocmp.com/projects/blinkenbone
I was always searching for a way to do something similar myself.

Is there a known way to switch "a lot of" (lets say 128) 230V AC lightbulbs? Relayinterfaces for pc offer mostly only 8 ports. Didn't i find the right devices? Or searched the wrong term?
Another way some people try are houseautomation devices (i don't know anything about these).

Could you imagine other ways to do this?
Do you know interfaces which use lets say 12v (for small lightbulbs) and handle this without relays?

Perhaps you have an idea!
Thanks a lot!!!
14  Products / Arduino Due / Re: IDE alternatives on: March 20, 2013, 05:45:44 pm
Hi!
Could you describe how you manage to import the arduino library to studio 6?
I get build errors all time.
For uploading i use bossac.
This thread was helpful: http://arduino.cc/forum/index.php/topic,151223.0.html
15  Products / Arduino Due / Re: Atmel Studio With Arduino Due on: March 19, 2013, 11:26:57 am
Hi!
Thank you neil for your advice!
I got rid off the "no previous declaration" errors! smiley
But.... smiley-sad
Now i am facing 58 errors like: undefined reference to 'GetTickCount' in wiring.c, undefined ref. to 'PIO_GetOutputDataStatus' in digital_wiring.c...and so on.
I only include Arduino.h like in the temporary compiled cpp from the arduino sdk.
Please help me out! This is so demotivating! I really don't know what i am doing wrong!
This was so easy with Uno...i did it many times without these strange probs....i am looking forward to loading the code up from atmel-studio...  smiley-cry
Can't somebody post a compiling example-atmel-solution?
That would be great!

Pages: [1] 2 3