Recent Activity on Millumin

  • Welcome Aboard!
    June 21
  • Pap joined.
    Welcome Aboard!
    June 20
  • areillat joined.
    Welcome Aboard!
    June 18
  • stevegoodman joined.
    Welcome Aboard!
    June 15
  • nikola joined.
    Welcome Aboard!
    June 14
  • jake123 joined.
    Welcome Aboard!
    June 7
  • loursunik and rmdesigns joined.
    Welcome Aboard!
    June 6
  • Welcome Aboard!
    June 4
  • Welcome Aboard!
    May 30
  • showmode joined.
    Welcome Aboard!
    May 29
  • Hi, I hope you are very well.
    I have many projects with millumin, it seems to me a spectacular program.
    There goes my consultation and where I need your help urgently.
    I am in a project of a xray slider with millumin and arduino.
    but I've been stuck in something maybe very simple.
    I have programmed my arduino with code for the functioning of the encoder, it works perfect for me.
    Now I just need to increase in this code functions so that by means of millumin commands, the arduino activates 2 relays.
    please your help since I do not have very good programming knowledge.
    I already have the dev-kit delivered by you installed.
    Thank you
    I await your comments.

    int encoderPin1 = 2;
    int encoderPin2 = 3;

    volatile int lastEncoded = 0;
    volatile long encoderValue = 0;

    long lastencoderValue = 0;

    int lastMSB = 0;
    int lastLSB = 0;

    void setup() {
    Serial.begin (9600);

    pinMode(encoderPin1, INPUT_PULLUP);
    pinMode(encoderPin2, INPUT_PULLUP);

    digitalWrite(encoderPin1, HIGH); //turn pullup resistor on
    digitalWrite(encoderPin2, HIGH); //turn pullup resistor on

    //call updateEncoder() when any high/low changed seen
    //on interrupt 0 (pin 2), or interrupt 1 (pin 3)
    attachInterrupt(0, updateEncoder, CHANGE);
    attachInterrupt(1, updateEncoder, CHANGE);

    }

    void loop(){
    //Do stuff here

    Serial.println(encoderValue);
    //delay(1000); //just here to slow down the output, and show it will work even during a delay
    }


    void updateEncoder(){
    int MSB = digitalRead(encoderPin1); //MSB = most significant bit
    int LSB = digitalRead(encoderPin2); //LSB = least significant bit

    int encoded = (MSB << 1) |LSB; //converting the 2 pin value to single number
    int sum = (lastEncoded << 2) | encoded; //adding it to the previous encoded value

    if(sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) encoderValue ++;
    if(sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) encoderValue --;

    lastEncoded = encoded; //store this value for next time
    }

    May 27
  • DanielR joined.
    Welcome Aboard!
    May 23
  • jeppecohrt and Glenny75 joined.
    Welcome Aboard!
    May 22
  • diC joined.
    Welcome Aboard!
    May 17
  • Welcome Aboard!
    May 16
  • Welcome Aboard!
    May 15
  • hi phillipe, im going to use millumin in a permanent installation (store) but i have to send output to rj45 cable cat6b to smart tv`s, how can i do to send this output. 
    May 10
  • SH_SEO and gdavidhill joined.
    Welcome Aboard!
    May 9
  • tutu10 and YLG joined.
    Welcome Aboard!
    May 6
  • chasekniffen joined.
    Welcome Aboard!
    May 3
  • Vbob joined.
    Welcome Aboard!
    May 1
  • POliveirav and mael joined.
    Welcome Aboard!
    April 30
  • Welcome Aboard!
    April 27
  • Peterk843 and parrot2602 joined.
    Welcome Aboard!
    April 23
  • megsmith and Mafelandia joined.
    Welcome Aboard!
    April 22
  • Artilom joined.
    Welcome Aboard!
    April 18
  • MHUGO and AVKILLS joined.
    Welcome Aboard!
    April 17
  • Welcome Aboard!
    April 13
  • Stuart and RonnyOliveira joined.
    Welcome Aboard!
    April 11
  • marvelmind joined.
    Welcome Aboard!
    April 3