Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Question about UNO R3 Mega16U2 firmware programming on: December 03, 2012, 08:17:02 am
Hello, Dear,
I have several questions about the firmware program to Mega16U2:
1. How to get into DFU mode?
2. Which program tools to use for the programming?
3. How to setting the fuse?

If there is detail program step introduction, more appreciated, thanks!
Now I want to use flip to program, but it show that "AtLibUsbDfu.dll not found","Could not load dynamic library".
When I load the hex file "Arduino-usbserial-atmega16u2-Uno-Rev3.hex" to the flip, it shows "Address is out of range"
2  Using Arduino / Audio / Re: Question about the MIDI library on: November 29, 2012, 06:47:11 am
Hi Xray,

my connection as below:
Cellphone -> Bluetooth Module -> Arduino UNO Serial port.

So, I want to know how to set the baud rate when use the MIDI library or it is default to 31250?

Regard to use serial port directly means that I don't use MIDI library but Serial library.

Hi,

Are you connecting you bluetooth receiver directly to RX/TX (serial) of the Arduino ?
I don't know that much about theses bluetooth module but they should be initialized no ?
Midi serial baud rate is 31250, don't know it you can use the midi library at 115200 baud (maybe, never tested).

What do you mean by using the serail port directly ? is this information written on the lcd ?

regards,
xray303


3  Using Arduino / Audio / Question about the MIDI library on: November 28, 2012, 05:34:17 am
I want to make a try for the MIDI library as that: use the Easy MIDI controller in my cell phone to send MIDI message via the bluetooth, and display the message in the LCD, howerver, when I click the key in my phone(piano mode),there is no response in the LCD. I have modified the baud rate of the bluetooth to 115200.  If I use serial port directly, I can see information like this ('1 53 110 1 57 0'), unlike the correct MIDI message, Does anyone give me a hand to see what happened? Thanks!

#include <MIDI.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,2,3,4,5,6,7,8,9,10);
void setup(){
  lcd.begin(16,2);
  Serial.begin(115200);
  MIDI.begin();
  MIDI.setHandleNoteOn(functionNoteOn);
  MIDI.setHandleNoteOff(functionNoteOff);
  lcd.clear();
  lcd.print("Hello,Cathy Lee!");
}

void loop(){
    delay(1000);
    MIDI.read();
}
void functionNoteOn(byte channel,byte pitch,byte velocity){
  lcd.print("NoteOn:");
  lcd.print(channel);
  lcd.print(' ');
  lcd.print(pitch);
  lcd.print(' ');
  lcd.print(velocity);
  lcd.print(' '); 
}
void functionNoteOff(byte channel,byte pitch,byte velocity){
  lcd.print("NoteOff:");
  lcd.print(channel);
  lcd.print(' ');
  lcd.print(pitch);
  lcd.print(' ');
  lcd.print(velocity);
  lcd.print(' ');   
}
4  Using Arduino / Displays / Auduino lesson1: LCD and bluetooth exercise on: November 08, 2012, 09:12:38 am
Auduino lesson1:Use my cell phone(Android) Control the LCD display via bluetooth. Source code as below: the variable parameter 'serialreceive' is very impotant, if you directly use Serial.read(), it will be error.
#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,2,3,4,5,6,7,8,9,10);
void setup(){
  lcd.begin(16,2);
  Serial.begin(9600);
  lcd.clear();
  lcd.print("Hello,Cathy Lee!");
}
char serialreceive;

void loop(){
  if(Serial.available()){
    delay(100);
    while(Serial.available()>0){
      serialreceive=Serial.read();
      if (serialreceive=='R')
      {lcd.clear();
       lcd.print("oh,yeah!");
      Serial.print("Hello");}
     else
        if (serialreceive=='L'){
   //     lcd.clear();
        lcd.setCursor(3,2);
        lcd.print("wonderful!");
        Serial.print("Get it!");
      }
      else
        if (serialreceive=='c')
        lcd.clear();
     else {
      //serialreceive=Serial.read();
      //lcd.clear();
      lcd.write(serialreceive);
      Serial.write(serialreceive);}
    }
  }
 
}
Pages: [1]