Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1078 Posts in 245 Topics- by 866 Members - Latest Member: Wjamnunsub

May 24, 2013, 09:12:10 PM
The Stribe Project - ForumGeneral CategoryhelpTopic: nano compatability
Pages: [1] |   Go Down
Print
Author Topic: nano compatability  (Read 1739 times)
0 Members and 1 Guest are viewing this topic.
mark b
Intrigued
*
Posts: 3


View Profile
« on: January 31, 2009, 04:22:26 PM »

will the arduino code from Stribe1_revC_11-29-08 work at the moment with the nano?

I've had a little browse but I'm a little out of my depth here. I'm gonna have another look but I thought I'd just check here quickly.

thankyou kindly.

oh and hello all. i'm mark and I make wierd music.
Logged
ultrajosh
Administrator
Master Striber
*****
Posts: 396



View Profile WWW
« Reply #1 on: February 01, 2009, 07:03:18 AM »

I don't have an Arduino Nano to try out, but I can't think of any reason why it wouldn't work.
Logged

"Well you touch it and it makes sounds."
mark b
Intrigued
*
Posts: 3


View Profile
« Reply #2 on: February 01, 2009, 08:58:21 AM »

cheers. I wasn't sure... I thought maybe the pin configuration might be different or something weird like that.
Logged
ultrajosh
Administrator
Master Striber
*****
Posts: 396



View Profile WWW
« Reply #3 on: February 01, 2009, 11:12:46 AM »

http://www.arduino.cc/en/Main/ArduinoBoardNano

The pins may be in slightly different locations but it looks like they are clearly marked.

Similar to the Arduino MINI, you would comment out the part of the firmware that does the multiplexing (since you have 8 ADCs vs Diecemila's 6, you can have a one-to-one correlation), and uncomment the stock code.  Like this:

      // Send out analog values   

     for (j=0;j<analog_inputs ;j++) {
       Serial.print("s");
       Serial.print(j);
       Serial.print(" ");
       Serial.print(analogRead(j));
       Serial.println();       
     }

     // optional code to read up to 13 or 15 analog channels using an Arduino and 4051BC analog multiplex
     // This particular rendition is setup to read 9 channels with a Diecimila and 4051BC
     
     /* for (j=0;j<analog_inputs ;j++) {
       Serial.print("s");
       Serial.print(j);
       Serial.print(" ");
       if (j>=5) { // use the 5th analog in channel to read 4 more analog signals by switching the multiplexer
         if (j==5) {
           digitalWrite(MULTIPLEX_A, LOW); // connect to multiplexer channel 0
           digitalWrite(MULTIPLEX_B, LOW);
           Serial.print(analogRead(5));
         }
         else if (j==6) {
           digitalWrite(MULTIPLEX_A, HIGH); // channel 1
           digitalWrite(MULTIPLEX_B, LOW);
           Serial.print(analogRead(5));
         }
         else if (j==7) {
           digitalWrite(MULTIPLEX_A, LOW); // channel 2
           digitalWrite(MULTIPLEX_B, HIGH);
           Serial.print(analogRead(5));
         }
         else if (j==8) {
           
           digitalWrite(MULTIPLEX_A, HIGH); // channel 3
           digitalWrite(MULTIPLEX_B, HIGH);
           Serial.println(analogRead(5));
     
         }
         
       }
       else {
         Serial.print(analogRead(j));
       // }
       Serial.println();       
     }
     */

OR just delete the code between the /* and */, and remove these: /* */ from around the snippet at the top.
Logged

"Well you touch it and it makes sounds."
Pages: [1] |   Go Up
Print
The Stribe Project - ForumGeneral CategoryhelpTopic: nano compatability
Jump to:  

Theme orange-lt created by panic