Show Posts
Pages: [1] 2 3 ... 19
1  Using Arduino / Project Guidance / Re: HX711 24 bit ADC with four load cells on: April 02, 2014, 04:09:03 pm
Hello Matt,

I also found out that the two channels can not have the same gain setting. smiley-mad
Currently busy with something else but as soon as that is ready this HX711 will be the next step.
I let you know how far I can get.

Paco
2  Using Arduino / Motors, Mechanics, and Power / Re: Ardumoto shield using as stepper driver on: March 30, 2014, 12:35:32 am
Hi Mark,

Rewiring the shield is not possible as the lines to the L298 chip are to small and it will be come a mess or will destroy the board for next projects.
If people say they got it to work I really need to try it too, just for the feeling it CAN work.  :-)
Ohters will have bought the board too and also stopped trying it to use as a stepper board.

I am new to stepper motors and eager to learn even the long way.

I know about the problem to powerless change the wires otherwise the chip will fail.

I looked again into the .cpp and .h file but cant find the way to change the sequence to the stepping as was proposed as the solution.

I also started to build a simple code without the # stepper,h to see if I can get the board to work.
I have now I think the code that can produce one step either left or right but now it comes down to stepping through to the next step.

Code:
boolean LeftTurn = 0;
boolean RightTurn = 0;
int Analog2 = 16; // Use analog port on shield for push button to control movement and direction
int Analog3 = 17; // Use analog port on shield for push button to control movement and direction

int pwm_3  = 3;    //PWM control for coil outputs 1 and 2 is on digital pin 3
int pwm_11 = 11;  //PWM control for coil outputs 3 and 4 is on digital pin 11
int dir_12 = 12;  //direction control for coil current outputs 1 and 2 is on digital pin 12
int dir_13 = 13;  //direction control for coil current outputs 3 and 4 is on digital pin 13

void setup()
{
  Serial.begin(9600);
 
  pinMode(Analog2,INPUT);   // set the A2 pin to input
  pinMode(Analog3,INPUT);   // set the A3 pin to input
  pinMode(pwm_3,  OUTPUT);
  pinMode(pwm_11, OUTPUT);
  pinMode(dir_12, OUTPUT);
  pinMode(dir_13, OUTPUT);
}

void loop()
{
  LeftTurn = digitalRead(Analog2);
  RightTurn = digitalRead(Analog3);
 
if (LeftTurn == 1) // coil A
{
  StepCounter = StepCounter + 1;
  analogWrite(pwm_3, 255); // > activate coil
  digitalWrite(dir_12, HIGH);  // > left flow coil
}
  else if (RightTurn == 1) //coil B
{
  StepCounter = StepCounter - 1;
  analogWrite(pwm_11, 255); // > activate coil
  digitalWrite(dir_13, HIGH);  // > left flow coil
}
  else
{
analogWrite(pwm_3, 0); // > activate coil
digitalWrite(dir_12,LOW);  // > left flow coi
analogWrite(pwm_11, 0); // > activate coil
digitalWrite(dir_13, LOW);  // > left flow coil

}
3  Using Arduino / Motors, Mechanics, and Power / Ardumoto shield using as stepper driver on: March 28, 2014, 02:26:08 pm
Hi guys,

I see mixed answers when it comes to using this shield https://www.sparkfun.com/products/9815 as a stepper driver
I googled inside and outside the forum but did not came to a satisfying answer to use the shield.
According to this link it should work.
https://forum.sparkfun.com/viewtopic.php?f=14&t=32640
But an other forum member there says the step sequence is not correct but only says he changed two lines in the library but not exactly explains what he did where in the cpp or h file.

His words
---------------------------
I get it working! but in a half: the sequence produced by stepper library isn't correct.
Now is doin 3-4-2-1
What I need to correctly move the motor is 3-1-4-2 (so B-A-B'-A').
----------------------------
This is my current code but the motor only humms and not rotate.

Any help to sort this out would be appriciated.

Thanks Paco

Code:
#include <HX711.h>
#include <Stepper.h>

// HX711.DOUT - pin #A1
// HX711.PD_SCK - pin #A0

HX711 scale(A1, A0); // parameter "gain" is ommited; the default value 128 is used by the library

const int stepsPerRevolution = 200;  // Stepper has 200 revolutions for CNC motor
Stepper myStepper(stepsPerRevolution, 3,11,12,13); // See reference for ARDUMOTO - it uses pins 3,11,12,13

boolean LeftTurn = 0;
boolean RightTurn = 0;
int incomingByte = 0;   // for incoming serial data
int StepCounter = 5000;
int Analog2 = 16; // Use analog port on shield for button push to control movement and direction
int Analog3 = 17; // Use analog port on shield for button push to control movement and direction
int ledPin = 8; //used for debug purpose only

void setup()
{
  Serial.begin(9600);
 
  pinMode(ledPin, OUTPUT);  //used for debug purpose only
  pinMode(Analog2,INPUT);   // set the A2 pin to input
  pinMode(Analog3,INPUT);   // set the A3 pin to input
 
  myStepper.setSpeed(70);  // set the speed at 70 rpm:
  // 70 is a nice fluid move  60-70 rpm, and a nice slow rotation could be 20
}

void loop()
{
  LeftTurn = digitalRead(Analog2);
  RightTurn = digitalRead(Analog3);
   
  Serial.print ("A,");
  Serial.println (StepCounter); // keeps score of the steps done to calulate the movement in mm + or -
  Serial.print ("B,");
  Serial.println(scale.read()/100); //raw loadcell data devided by 100

 
  if (Serial.available() > 0)
  {
  incomingByte = Serial.read();
    {
    if (incomingByte = 0)
    {
      LeftTurn = 1;
    }
    if (incomingByte = 1)
    {
      RightTurn = 1;
    }
  }
  }

     
if (LeftTurn == 1)
{
  myStepper.step(stepsPerRevolution); // Do a full left turn of 200 steps
  delay(50);
  StepCounter = StepCounter + 1;
  digitalWrite(ledPin, HIGH); //used for debug purpose only
}
  else if (RightTurn == 1)
{
  myStepper.step(stepsPerRevolution * -1); // Do a full right turn of 200 steps
  delay(50);
  StepCounter = StepCounter - 1;
  digitalWrite(ledPin, HIGH); //used for debug purpose only
}
  else
{
digitalWrite(ledPin, LOW); //used for debug purpose only


//  According to sparkfun forum to correctly move the motor correctly is 3-1-4-2 (so B-A-B'-A') for one direction so change standard libary step sequence.

}
The stepper is a 4 wire with two coils of 3,8 ohm with 200 steps where one coil is conencted to 1/2 and the other connected to 3/4
.
4  Using Arduino / Project Guidance / Re: HX711 24 bit ADC with four load cells on: March 17, 2014, 02:58:19 pm
Yep I found that Lib this afternoon too.

Still do not fully understand it all but I ordered two of these babies and when they are in I first gonna check with this lib if I can get it to work on A channel and then see if the B channel can be trapped too into a println function to get the data over to the PC. It looks like all only use the A channel to be captured or am I missing something then?
Then comes the trick to read four channels. One channel at the time..........for now.

All the hardwork will be done like tarre and zeroing in the PC. I only need the raw data (milivolts). Maybe at a later stage I will see if I can adapt with Blue Tooth and an Android app to get the data the same way as on the PC by USB.

First I have to understand what goes on.

Paco



5  Using Arduino / Project Guidance / Re: HX711 24 bit ADC with four load cells on: March 17, 2014, 04:37:42 am
NY,

I studied the datasheet. Table 3 and figure 2 are conflicting where table 3 is correct and figure 2 contains channel B at 64 gain which should be channel A 64 gain.
Understand now that pulses 25,26,27 determen which data is send out from the HX711 and which gain should be used.
But my knowledge at this moment fails to see how I can read the data to the MCU othe rthen the sample codes.
I have no clue if the current available .h and .cpp files are designed to get also the B channel data.
In all samples only one value is displayed
Serial.print(scale.getGram(), 1);
Serial.println(" g");
or do I understand wrong?

Paco

6  Using Arduino / Project Guidance / Re: HX711 24 bit ADC with four load cells on: March 16, 2014, 04:24:30 pm
Ny,

That would mean 8 analog inputs need to be used?

Paco
7  Using Arduino / Project Guidance / Re: HX711 24 bit ADC with four load cells on: March 16, 2014, 03:05:41 pm
Need to measure independ at each corner a value. Wheel pressure on each wheel......... smiley

Paco
8  Using Arduino / Project Guidance / HX711 24 bit ADC with four load cells on: March 16, 2014, 01:35:44 pm
Hi guys,

I found the HX711 and was curious if it could work for one of my projects which currently uses other ADC..
This 24 BIT ADC has 2 differential inputs for 2 load cells.
In the end I need 4 load cells so that means the use of 2 x HX711.
All the code I found is only refering to measuring one load cell on the A- and A+ input instead of two.
The output for communication is fed to the A0 and A1 analog inputs.

Now would it be possible to have two of the HX711 connected to an UNO and read all the load cells to a serial print function.
The data needs to be ported to a PC by USB.
So the second HX711 connected to A2 and A3.

Would the hx711.h libary need to be adapted or can I change the libaries name for example hx711-1 and hx711-2 and both use in the same sketch ?

Any tips or trick if this could work would be appriciated.
Code:
/* sample for digital weight scale of hx711, display with a HD44780 liquid crtstal monitor
 *
 * hardware design: syyyd
 * available at http://syyyd.taobao.com
 *
 * library design: Weihong Guan (@aguegu)
 * http://aguegu.net
 *
 * library host on
 * https://github.com/aguegu/Arduino
 */

// Hx711.DOUT - pin #A1
// Hx711.SCK - pin #A0

#include "hx711.h"

Hx711 scale(A1, A0);

void setup() {

  Serial.begin(9600);

}

void loop() {

  Serial.print(scale.getGram(), 1);
  Serial.println(" g");

  delay(200);
}
9  Using Arduino / Programming Questions / Re: Code slows down with simple led on/off added on: November 05, 2013, 11:39:23 am
I did a test and found this behaviour.

When I do not change the force measurement of the ADC and perform 4 times in a row a quick on/off led activation there is nothing happening. Then after 3 seconds the led will go on/off four times. If I do the same for 10 times the same behaviour appears. So it looks the on/off switching is stored and then perfomed.

Anyone with some advice on this?

Thanks in advance, Paco
10  Using Arduino / Programming Questions / Re: Code slows down with simple led on/off added on: November 04, 2013, 09:12:27 am
I add the manual of the TM7709 in case this might shine more light to it then it already does.

BTW there two lines of code that say " while  >    A==A"

This is the Original undressed code that belongs to the ADC.
I undressed it from parts I did not needed.

As far I understand it is 8 bits and the length of the word is send when all 8 bits are received.
If there is a delay in sending when there is no value change I can not figure out this cause the loop to wait.

Code:
//TM7709 24bit ADC module arduino sketch
//coldtears electronics

//default connection arduino UNO
//DRDY = 11
//ADIO = 12
//SCLK = 13


#define TM7710_DRDY        3         
#define TM7710_ADIO        4         
#define TM7710_ADIO_OUT()  DDRB|=1<<4     
#define TM7710_ADIO_IN()   DDRB&=~(1<<4) 
#define Set_TM7710_SCLK()  PORTB|=1<<5
#define Set_TM7710_ADIO()  PORTB|=1<<4
#define Clr_TM7710_SCLK()  PORTB&=~(1<<5)
#define Clr_TM7710_ADIO()  PORTB&=~(1<<4)

unsigned char x[3];
long Result;
float vref=4.89;

void TM7710_start(void)   
{
    Clr_TM7710_ADIO();
    delayMicroseconds(1);
    Clr_TM7710_SCLK();
    delayMicroseconds(1);
}

void TM7710_stop(void)   
{
    Clr_TM7710_ADIO();
    delayMicroseconds(1);
    Set_TM7710_SCLK();
    delayMicroseconds(1);
    Set_TM7710_ADIO();
    delayMicroseconds(1);
}

void TM7710_write(unsigned char dd)
{
    unsigned char i;

    for(i=8;i>0;i--)
    {
        if(dd&0x80)
            Set_TM7710_ADIO();   
        else
            Clr_TM7710_ADIO();   
       
        delayMicroseconds(1);
        Set_TM7710_SCLK();       
        delayMicroseconds(1);
        Clr_TM7710_SCLK();     
        dd<<=1;                 
    }
}

unsigned char TM7710_read(void)
{
    unsigned char data=0,i;

    for(i=0;i<8;i++)
    {
        Set_TM7710_SCLK();                   
       
        data=data<<1;                                 
        if((PINB&(1<<TM7710_ADIO))==(1<<TM7710_ADIO)) 
        {
          data=data+1;
        }
        delayMicroseconds(1);
        Clr_TM7710_SCLK();
         delayMicroseconds(1);
    }
    return data;
}
void TM7710_Init()
{
   TM7710_ADIO_OUT();
   delay(100);
   TM7710_stop();
   TM7710_start();
   TM7710_write(0xBF);       
   TM7710_write(0x20);      //Gain=128
   //TM7710_write(0x00); //Gain=16
   TM7710_stop();     
}
void setup()
{
DDRB|=1<<5 ;
delay(1000);
Serial.begin(9600);
Serial.println("TM7709 24bit ADC Module");
TM7710_Init();
}
   
void loop()

   while((PINB&(1<<TM7710_DRDY))==(1<<TM7710_DRDY));
   TM7710_start();
   TM7710_write(0x7F);       
   TM7710_ADIO_IN();         
   for(unsigned char j=0;j<3;j++)
   {
   x[j]=TM7710_read();
   }
   TM7710_ADIO_OUT();         
   TM7710_stop();
   Result=x[0];
   Result = Result * 256;
   Result = Result + x[1];
   Result = Result * 256;
   Result = Result + x[2];
   Result = Result - 6912000;
   
   double volt = Result * vref /16 / 6912000;
   printFloat(volt,6);
   Serial.println(" V  ");

}


 void printFloat(float value, int places) {
 // this is used to cast digits
 int digit;
 float tens = 0.1;
 int tenscount = 0;
 int i;
 float tempfloat = value;

 // if value is negative, set tempfloat to the abs value

   // make sure we round properly. this could use pow from
 //<math.h>, but doesn't seem worth the import
 // if this rounding step isn't here, the value  54.321 prints as

 // calculate rounding term d:   0.5/pow(10,places)
 float d = 0.5;
 if (value < 0)
   d *= -1.0;
 // divide by ten for each decimal place
 for (i = 0; i < places; i++)
   d/= 10.0;
 // this small addition, combined with truncation will round our

 tempfloat +=  d;

 if (value < 0)
   tempfloat *= -1.0;
 while ((tens * 10.0) <= tempfloat) {
   tens *= 10.0;
   tenscount += 1;
 }

 // write out the negative if needed
 if (value < 0)
   Serial.print('-');

 if (tenscount == 0)
   Serial.print(0, DEC);

 for (i=0; i< tenscount; i++) {
   digit = (int) (tempfloat/tens);
   Serial.print(digit, DEC);
   tempfloat = tempfloat - ((float)digit * tens);
   tens /= 10.0;
 }

 // if no places after decimal, stop now and return
 if (places <= 0)
   return;

 // otherwise, write the point and continue on
 Serial.print('.');

 for (i = 0; i < places; i++) {
   tempfloat *= 10.0;
   digit = (int) tempfloat;
   Serial.print(digit,DEC);
   // once written, subtract off that digit
   tempfloat = tempfloat - (float) digit;
 }
 
  }

11  Using Arduino / Programming Questions / Re: Code slows down with simple led on/off added on: November 04, 2013, 05:05:39 am
Jack, if I look at it with my knowledge nothing happens as long as the value stays the same, if this cause a delay I do not know. You might be correct this causes the delay. I did not made the code for the ADC and most of it for me it is "adacadabra". I will check this evening what happens if I constant change the value of the force if the led will switch quicker. Let you know.

Thanks, Paco
12  Using Arduino / Programming Questions / Re: Code slows down with simple led on/off added on: November 03, 2013, 06:02:14 am
OK, some steps further.
I add the changes some mentioned.
Used other code without delay for the encoder.
I commented out all delays in the code for the ADC.
Same problem.
Then to troubleshoot I took out all code for the ADC!
That cured the LED problem.
So problem is inside the ADC code.

I have no idea where to look more in this ADC code then switching off the delays in microseconds.
I tested the ADC code without the micorseconds delay and the code works as the results I expect for measuring the force.

Quote
Well, for starters, you are declaring Result, which will be initialized to 0, then the first thing you do with it is:

Code:

 double volt = Result * vref /16 / 6.912;

So, what is the value of volt, after assigning it 0 * 4.57 / 16 / 6.912 ?

 @Lar3ry
That would give 0 at that moment, dont shoot me but I am missing your point.

Thanks, Paco

13  Using Arduino / Programming Questions / Re: Code slows down with simple led on/off added on: November 03, 2013, 01:50:06 am
Thanks for all responses and thinking with me,
Got me offset more then I expected. :-)

@Pete": Yes you correct about the behaviour. The LED switches but not directly.

For the others the code for the ADC TM7709 came with it and if it contains wrong declaration I was not aware of. I am not that far in programming to detect such things when looking at the code. For my first purpose of using the ADC the code gave me the results I need. If it is not optimized for speed in combination with other snippets of code I was not aware of until.......  The code for the linear encoder and the interrupts I took it somewhere else and pasted it in the ADC code.

I will look with all things said at the code and implement the suggestions.
Hope that cures the problem and brings me to a higher programming level.

Paco

Let you know the progress.

 
14  Using Arduino / Programming Questions / Code slows down with simple led on/off added on: November 02, 2013, 01:32:10 pm
I have a working piece of code that measures force with an AD converter and movement with an encoder strip. Data is transported to a PC by USB to an VB6 application. I need to add a motor control from VB6 (simple motor on motor off) to the arduino UNO. So I started with the basics of that but got stuck.

I have piece of code that switch on and off a led with processing through serial (before I implement it in VB6) . This also works fine and when I change the state in processing the led goes off imediatly and vise versa. So I took this code and pasted it in the force/motion code. The behaviour I get is that the led switch on and off in a random eratic delay. I know this is a basic problem but I am overlooking something very simple I think.

Any guidance would be appriciated.

Code for LED on off
Code:
const int ledPin = 8; // the pin that the LED is attached to
int incomingByte;      // a variable to read incoming serial data into

void setup() {
   // initialize serial communication:
   Serial.begin(9600);
   // initialize the LED pin as an output:
   pinMode(ledPin, OUTPUT);
}

void loop() {
   // see if there's incoming serial data:
   if (Serial.available() > 0) {
     // read the oldest byte in the serial buffer:
     incomingByte = Serial.read();
     // if it's a capital H (ASCII 72), turn on the LED:
     if (incomingByte == 'H') {
       digitalWrite(ledPin, HIGH);
     }
     // if it's an L (ASCII 76) turn off the LED:
     if (incomingByte == 'L') {
       digitalWrite(ledPin, LOW);
     }
   }
}


Code for force and movement with led on off added.
Code:
// Interrupt information optical encoder
// 0 on pin 2
// 1 on pin 3

//default connection arduino NANO/UNO TM7709 24 bit ADC
//DRDY = pin 11 >MOSI
//ADIO = pin 12 >MISO
//SCLK = pin 13 >SCK

//default connection arduino MEGA TM7709 24 bit ADC
//DRDY = pin 21 >MOSI
//ADIO = pin 22 >MISO
//SCLK = pin 28 >SCK

#define TM7710_DRDY        3          
#define TM7710_ADIO        4          
#define TM7710_ADIO_OUT()  DDRB|=1<<4    
#define TM7710_ADIO_IN()   DDRB&=~(1<<4)  
#define Set_TM7710_SCLK()  PORTB|=1<<5
#define Set_TM7710_ADIO()  PORTB|=1<<4
#define Clr_TM7710_SCLK()  PORTB&=~(1<<5)
#define Clr_TM7710_ADIO()  PORTB&=~(1<<4)

unsigned char x[3];
long Result;
float vref=4.57;
int motorValue ;
const int ledPin6 = 6; // the pin that the LED is attached to
 const int ledPin7 = 7; // the pin that the LED is attached to
int led = 8;
int incomingByte;      // a variable to read incoming serial data into

enum PinAssignments
{
  encoderPinA = 2,   // rigth
  encoderPinB = 3,   // left
};

volatile unsigned int encoderPos = 5000;  // a starting counterposition for the encoder
unsigned int lastReportedPos = 1;   // change management
static boolean rotating=false;      // debounce management

// interrupt service routine vars
boolean A_set = false;              
boolean B_set = false;

void setup()
{
  DDRB|=1<<5 ;
  Serial.begin(9600);// set baudrate for PC too!
  TM7710_Init();

  pinMode(encoderPinA, INPUT);
  pinMode(encoderPinB, INPUT);
  
 // turn on pullup resistors
  digitalWrite(encoderPinA, HIGH);
  digitalWrite(encoderPinB, HIGH);
  

// encoder pin on interrupt 0 (pin 2)
  attachInterrupt(0, doEncoderA, CHANGE);
// encoder pin on interrupt 1 (pin 3)
  attachInterrupt(1, doEncoderB, CHANGE);
  
   pinMode(ledPin6, OUTPUT);
   pinMode(ledPin7, OUTPUT);
   pinMode(led,OUTPUT);

}

void loop()
{  
  /------------------------------------------ problem part ----------------------------------------
   if (Serial.available() > 0)
   {
     incomingByte = Serial.read();
     if (incomingByte == '1')
     {
       digitalWrite(ledPin6, HIGH);
       digitalWrite(ledPin7, LOW);
     }
     if (incomingByte == '0')
     {
       digitalWrite(ledPin6, LOW);
       digitalWrite(ledPin7, HIGH);
     }
   }
   /------------------------------------------------------------------------------------  
  double volt = Result * vref /16 / 6.912;

  while((PINB&(1<<TM7710_DRDY))==(1<<TM7710_DRDY));
  TM7710_start();
  TM7710_write(0x7F);        
  TM7710_ADIO_IN();          
  for(unsigned char j=0;j<3;j++)
  
  {
    x[j]=TM7710_read();
  }
  
  TM7710_ADIO_OUT();        
  TM7710_stop();
  Result=x[0];
  Result = Result * 256;
  Result = Result + x[1];
  Result = Result * 256;
  Result = Result + x[2];
  Result = Result - 6912000;

  Serial.print ("A,");
  Serial.println (volt,0);
  Serial.print("B,");
  Serial.println(encoderPos, DEC);
  Serial.print("C,");
  Serial.println (motorValue);
  
  
    rotating = true;  // reset the debouncer

  if (lastReportedPos != encoderPos) {
    
    lastReportedPos = encoderPos;
  }
}

void TM7710_start(void)  
{
  Clr_TM7710_ADIO();
  delayMicroseconds(1);
  Clr_TM7710_SCLK();
  delayMicroseconds(1);
}

void TM7710_stop(void)    
{
  Clr_TM7710_ADIO();
  delayMicroseconds(1);
  Set_TM7710_SCLK();
  delayMicroseconds(1);
  Set_TM7710_ADIO();
  delayMicroseconds(1);
}

void TM7710_write(unsigned char dd)
{
  unsigned char i;

  for(i=8;i>0;i--)
  {
    if(dd&0x80)
      Set_TM7710_ADIO();  
    else
      Clr_TM7710_ADIO();  

    delayMicroseconds(1);
    Set_TM7710_SCLK();      
    delayMicroseconds(1);
    Clr_TM7710_SCLK();      
    dd<<=1;                  
  }
}

unsigned char TM7710_read(void)
{
  unsigned char data=0,i;

  for(i=0;i<8;i++)
  {
    Set_TM7710_SCLK();                  

    data=data<<1;                                  
    if((PINB&(1<<TM7710_ADIO))==(1<<TM7710_ADIO))  
    {
      data=data+1;
    }
    delayMicroseconds(1);
    Clr_TM7710_SCLK();
    delayMicroseconds(1);
  }
  return data;
}

void TM7710_Init()
{
  TM7710_ADIO_OUT();
  delay(100);
  TM7710_stop();
  TM7710_start();
  TM7710_write(0xBF);        
  TM7710_write(0x20); //ADC preamp Gain=128
  TM7710_stop();      
}

// Interrupt on A changing state
void doEncoderA(){
  // debounce
  if ( rotating ) delay (1);  // wait a little until the bouncing is done

  // Test transition, did things really change?
  if( digitalRead(encoderPinA) != A_set ) {  // debounce once more
    A_set = !A_set;

    // adjust counter + if A leads B
    if ( A_set && !B_set )
      encoderPos += 1;

    rotating = false;  // no more debouncing until loop() hits again
  }
}

// Interrupt on B changing state, same as A above
void doEncoderB(){
  if ( rotating ) delay (1);
  if( digitalRead(encoderPinB) != B_set ) {
    B_set = !B_set;
    //  adjust counter - 1 if B leads A
    if( B_set && !A_set )
      encoderPos -= 1;

    rotating = false;
  }
}
15  Using Arduino / Project Guidance / Re: 2d graph from movement and sensor data on: October 30, 2013, 03:56:25 pm
I would search first for information about humidity sensors to measure it too.
Pages: [1] 2 3 ... 19