Show Posts
Pages: [1] 2 3 ... 18
1  International / Français / Re: Vente d'Arduino à Paris en projet on: February 16, 2011, 02:53:22 pm
Merci à tous pour vos réponses !
Je me rends compte que tout le monde n'est pas du tout dans la même situation au moment d'aborder l'Arduino...
Dans mon cas j'ai toujours acheté tous les petits composants électroniques dans le magasin de ma (petite) ville, puis maintenant à Paris. Dès qu'il faut quelque chose de spécialisé d'autre j'utilise Farnell, les chinois sur eBay ou Sparkfun.
Le seul shield que j'ai est un ethernet shield, et je l'ai abandonné dès que j'ai dessiné mes circuits imprimés.
Bref, merci encore et s'il y a des intéressés j'apprécierai leurs avis !
2  International / Français / Vente d'Arduino à Paris en projet on: February 15, 2011, 05:32:41 am
Bonjour,

Je suis en train de réfléchir à devenir distributeur Arduino à Paris.
Les tarifs de l'Arduino Uno seraient
- 25€ frais de ports compris en France
- 22€ à venir retirer à Paris

J'aimerais savoir quel intérêt ça suscite, seriez-vous prêts à changer vos habitudes pour un distributeur français beaucoup moins cher (fdp compris) localisé à Paris ?
Les frais de ports économisables vous interpellent-ils par rapport aux boutiques en lignes (et leurs 7 ou 11€ de fpd selon...) ?

Bien à vous,

Cyrille
3  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: September 02, 2009, 05:30:59 am
I would do it that way. You have to adapt it for more leds !

Code:
//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/////////NEW variables
int blinkingledsare=0;
int ledstatus[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int ledwas[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int lednumber=1;
unsigned long checkpoint;

//variables setup
byte incomingByte;



void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);



//setup: declaring iputs and outputs and begin serial


  Serial.begin(57600);        //start serial with midi baudrate 57600
}




void loop () {
//listening loop
 if (Serial.available() > 3) { //if serial incoming
    incomingByte = Serial.read(); //read it

    if (incomingByte==144){} // analyze the first byte (status) : 144 is note on ch1
     else {lc.setLed(0,3,3,false);} //if the first byte is not a note on message, LED is off

    incomingByte = Serial.read(); //read the next byte

      if (incomingByte==60){              // If the byte is note60

        incomingByte = Serial.read();     //read the next byte

        if(incomingByte==127){            //if velocity is 127 then clip is playing and LED is on
            ledstatus[0]=1; //on
        }else if(incomingByte==1){        //if velocity is 1 then clip is looping and LED is still on
            ledstatus[0]=1; //on
         }else if(incomingByte==126){
             ledstatus[0]=2;  //blink
         }else{ //The LED will shut off if the above paremeters are not met
            ledstatus[0]=0; //off
        } //close else

      }


    } //close first if incoming
    
    
//Let's do it

  if(ledstatus[0]!=ledwas[0]){
   if(ledstatus[0]==1){lc.setLed(0,3,3,true);} //do on
   if(ledstatus[0]==0){lc.setLed(0,3,3,false);}// do off
   if(ledstatus[0]==2 && millis()>(checkpoint+500) ){ //change blink status if half second passed since last time
     if(blinkingledsare==0){ //if blinking leds were off
       lc.setLed(0,3,3,true); //on
       blinkingledsare=1; //change status
       checkpoint=millis(); //checkpoint
     }
     if(blinkingledsare==1 && millis()>(checkpoint+500) ){
       lc.setLed(0,3,3,false);
       blinkingledsare=0;
       checkpoint=millis();
     }
   }
  }
  
//}
    
    
    
    
    
 } //close loop

(Btw my e-mail is below, but I was just kidding about the title! Here we prefer to help the people learn step by step than doing it for them smiley-wink)
4  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: September 01, 2009, 03:42:14 am
The switch statement can be usefull but I wrote about this : http://arduino.cc/en/Reference/Millis
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: September 01, 2009, 03:16:39 am
IMO, for the blinking one you should look into modifying the code in to parts inside the loop:
- The first one listen like now for MIDI IN and puts into variables (one for each led) the status : 0 for off, 1 for on and 2 for blink.
- The second part you check those variables and do it.
  For the blink the trick is that you must do a checkpoint (see millis() in reference and forum) and check each time it arrives at this condition (the main loop is very fastly done!) if millis()>checkpoint+500 and change then the led.
Note also that you need to have a variable for global status of the blinking leds (blinking=1 means for exemple all the blinking ones are on).

I hope this is clear, experiment a little the millis() function to understand how it works!  smiley-wink
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: September 01, 2009, 02:18:45 am
You can remove those, that was for the onboard 13 pin LED.
Did you test the matrix as is with the example code? (for the connection)
7  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: August 31, 2009, 04:11:14 am
No!

Analyse this code:

This has to be before the setup() :
Code:
//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=100;
This is the setup
Code:
void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}

This is the main loop

Code:
void loop() {

lc.setLed(0,3,3,true);
delay(1000);
lc.setLed(0,3,3,false);
delay(1000);

}
 
lc.setLed(0,3,3,true); is led on col 3 row 3 on.
lc.setLed(0,3,3,false); is the same off


So, now if you understand this:

This is before the setup:
Code:
//variables setup
byte incomingByte;

int statusLed = 13;   // select the pin for the LED

 
This is the setup:
 
Code:
//setup: declaring iputs and outputs and begin serial
void setup() {
  pinMode(statusLed,OUTPUT);   // declare the LED's pin as output
  Serial.begin(57600);        //start serial with midi baudrate 31250 or 38400 for debugging
}
 

This is the main loop, commented.
Code:

void loop () {
  
 if (Serial.available() > 0) { //if serial incoming
    incomingByte = Serial.read(); //read it
    if (incomingByte==144){ // analyse the first byte (status) : 144 is note on ch1
      incomingByte = Serial.read(); //read the next byte

      if (incomingByte==60){ // analyse the second byte (note) : 60 is middle C
        incomingByte = Serial.read(); //read the next byte
        if(incomingByte>0){  //analyse the third byte : velocity >0
          digitalWrite(statusLed, HIGH);
        }else{ //analyse the third byte : velocity=0
          digitalWrite(statusLed, LOW);
        }
      }
      if (incomingByte==61){ // analyse the second byte (note) : 61 is middle C#
        incomingByte = Serial.read(); //read the next byte
        if(incomingByte>0){  //analyse the third byte : velocity >0
          digitalWrite(statusLed, HIGH);
        }else{ //analyse the third byte : velocity=0
          digitalWrite(statusLed, LOW);
        }
      }

    }
 }

}

Merge the two codes :
- before the setup
- the setup
- inside the main loop, digitalWrite(statusLed, HIGH); and digitalWrite(statusLed, LOW); will be basically replaced by lc.setLed(0,col,row,true); or lc.setLed(0,col,row,false);


(Donations welcome!  smiley-razz)
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: August 31, 2009, 02:58:08 am
The first code you give is for TX, and you want RX (receive).
Please use the code I gave you, just change the baud rate to 57600.

And look at this simplified code of the matrix code: this should blink the (4,4) led.
Code:
//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=100;

void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}

void loop() {

lc.setLed(0,3,3,true);
delay(1000);
lc.setLed(0,3,3,false);
delay(1000);

}
9  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: August 31, 2009, 01:04:00 am
Good, you see, never give up !  smiley-grin
Simplify the matrix code to just manual light on some led, it will be very clear later.
For the moment don't look after the blinking leds, just on and off and will look at that later  smiley-wink

Thanks for your informations about midi note control in ableton live! I didn't yet looked after that, but the possibilities are great!
10  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: August 30, 2009, 03:21:50 pm
For MIDI over USB, two solutions :
- A software that does the translation http://www.spikenzielabs.com/SpikenzieLabs/Serial_MIDI.html
- A USB-MIDI cable hidden inside the enclosure

Here you can see how a put on or off the onboard LED for middle C: (untested, should work)
Code:
//variables setup
byte incomingByte;

int statusLed = 13;   // select the pin for the LED


//setup: declaring iputs and outputs and begin serial
void setup() {
  pinMode(statusLed,OUTPUT);   // declare the LED's pin as output
  Serial.begin(31250);        //start serial with midi baudrate 31250 or 38400 for debugging
}


void loop () {
  
 if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte==144){ // 144 is note on ch1
      incomingByte = Serial.read();
      if (incomingByte==60){ // 60 is middle C
        incomingByte = Serial.read();
        if(incomingByte>0){  //velocity >0
          digitalWrite(statusLed, HIGH);
        }else{ //velocity=0
          digitalWrite(statusLed, LOW);
        }
      }
    }
 }
 
}

 

You just have to make a working LED matrix and add the code instead of my digitalWrites.  smiley
11  Forum 2005-2010 (read only) / Troubleshooting / Re: Can I pay someone to write a sketch for me? on: August 30, 2009, 06:52:18 am
It's definately not very complicated to make.

In addition to our MIDI IN tread, I can suggest you to have a look at this library http://www.arduino.cc/playground/Main/LedControl and the matrix example.
You only need conditions and some  "lc.setLed(0,row,col,true);" to light up the leds.
12  Forum 2005-2010 (read only) / Troubleshooting / Re: Win me driver on: August 31, 2009, 03:04:39 am
http://www.ftdichip.com/Drivers/VCP.htm
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Cant upload sketches/flash chip on: August 26, 2009, 03:23:45 pm
Do your onboard 13-pin LED blinks?

Anyway with those problems, if you bought it a very short time ago and couldn't get it work, ask your shop for a replacement chip!
14  Forum 2005-2010 (read only) / Interfacing / Re: 4051 Multiplexer example code? on: April 14, 2009, 09:20:33 am
Yes : http://fluidforms.eu/de/CassiusHow.php
15  Forum 2005-2010 (read only) / Interfacing / Re: 4051 Multiplexer example code? on: April 14, 2009, 08:38:09 am
I'm interested, because I want to use this mux, but the sample code doesn't seem very complete... can you tell me how it works now and your current code?

Thanks!
Pages: [1] 2 3 ... 18