Show Posts
Pages: [1] 2
1  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 22, 2014, 10:31:20 am
Well,

I did not get it.

Can you elaborate if you don't mind.
2  Using Arduino / Displays / Re: 16x2 LCD Scrolling Improperly for array with more then 5 strings on: August 21, 2014, 12:45:24 pm
Such a helpful article.  smiley

How did you manage to find it ? (Google ? Really ?  smiley-slim)

Issue Solved. Thank You
3  Using Arduino / Displays / 16x2 LCD Scrolling Improperly for array with more then 5 strings on: August 21, 2014, 05:16:08 am
Hi

I wrote the code below to scroll an array of string but the display in the LCD becomes improper if I extend the number of strings to 6 from 5.

By 'Improper' I mean, the display is something like this,

(Sorry for the poor image quality)
Code:
char* var[]={"RISHI ","RIPUNJOY ","BIKASH ","CHAMPAK ","DEEP ","MADHURJYA "};
#include <LiquidCrystal.h>


LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
 
  for(int i=0;i<6;i++){
      lcd.print(var[i]); 
  } 
  delay(1000);
}


void loop() { 
  // to move it offscreen left:
  for (int positionCounter = 0; positionCounter < 46; positionCounter++) {
        lcd.scrollDisplayLeft();     
        delay(500);
  }
  delay(1000);
}


As you can see, instead of showing the string 'MADHURJYA' it show 'MADHURISHI' and the lettes 'RJYA' shift to second row. This problem does not arises if I keep the string restricted to 5
4  Using Arduino / Project Guidance / Displaying data on the Web w/o ethernet shield on: August 17, 2014, 11:33:09 am
I have projects laying around which gives out data via arduino, one of them is temperature data logging and showing it in screen (via Processing)

Now I want to know, how can I make a system that would send this data to the Internet so that I can log into a website (or ip) and see that data and if necessary make changes (input to Arduino from the internet). I know this isn't possible without a webserver but I have a Raspberry Pi to act as webserver.

What I would like to know what is the process flow as I don't know any back end programming lang like PHP etc. How can I achieve this project, what will be the requirement ? How do I proceed ? I will be glad if a detailed description is given out by someone.

Thank You
5  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 17, 2014, 11:22:16 am
okay,
Now I have an entirely new problem.

In my 5 row 8 column hardware, all cathode are connected column wise. So that way if Is send 11111110 as column bit, the LED corresponding to bit 0 glows up and rest are OFF. Now if I left shift it by 1 ((11111110)<<1) I get 11111100 and this result in two LED lighting up but I want 11111101 when it left shifts by 1 (Kind of circular shift so that new bit 0 is replaced by bit 7) of the same byte ?

Is this possible ?? I could not figure out a way
6  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 16, 2014, 12:59:05 am
Back again smiley
Instead of starting a new post I thought it will be good to continue here.

What I want now is the have a scrolling message at the LED matrix. I have changed my connection, i.e. now I am feeding data to columns and scanning the rows.  I can easily scroll a letter by left shifting the column values by 1 but how do I feed new data to the column once the old data has shifted by significant times ?

Since my LED matrix is 5 rows 8 columns, so I decided to display 2 letter at a time, one of which will take 4 columns and the other letter would take rest of the 4 columns

e.g. For my letter 'A', the 5th row's column data would be 11110110 (Column are connected to cathode). Ones this data is shifted left by 1 times, I want the letter 'B's data to take the LSB position, in short I want to keep feeding data so that new text are displayed in the LED after the old ones are shifted significantly, how do I do that ?
7  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 12, 2014, 11:33:37 am
Just found out that this code works better. No other LED glows even a little except the desired ones

Code:

int latchPin = 10;
int clockPin = 13;
int dataPin = 11;
int data[5]={15,18,18,15}; //For Letter A only
int j=0;
void setup()
{
  pinMode(latchPin,OUTPUT);
  pinMode(clockPin,OUTPUT);
  pinMode(dataPin,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);
}

void loop()

  if(j==4){j=0;}
  switch(j)
  {
    case 0:
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);
    digitalWrite(latchPin,HIGH);
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
     break;
     
    case 1:
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);
    digitalWrite(latchPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,LOW);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    break;
   
   
    case 2:
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);
    digitalWrite(latchPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,LOW);
      digitalWrite(7,HIGH);
    break;
   
   
    case 3:
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);
    digitalWrite(latchPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,LOW);
    break;     
  }
  j=j+1;
  delay(5);
}




Now after all these tests I think something is wrong in the SPI thing
8  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 12, 2014, 11:03:45 am
Yes, tested the outputs via multimeter, all looks fine.

To test it further, I uploaded my previous sketch by using the same Pins of Arduino as this (new sketch). The LED glows as this



 
which is almost the result I wanted. Perhaps the flickering effect is gone due to the decoupling capacitor you suggested me to use.

But, its strange that the code which you gave using SPI transfer did not work, I could not figure out why, but for sure that the error is not in hardware part.

Here is the code for the image above

Code:
int latchPin = 10;
int clockPin = 13;
int dataPin = 11;
int data[5]={15,20,20,15}; //For Letter A only
void setup()
{
  pinMode(latchPin,OUTPUT);
  pinMode(clockPin,OUTPUT);
  pinMode(dataPin,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);

}

void loop()
{
  for(int j=0;j<4;j++)
  {
    //Scanning Column
    
    if(j==0)
    {
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    }
    else if(j==1)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,LOW);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    }
    else if(j==2)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,LOW);
      digitalWrite(7,HIGH);
    }
    else if(j==3)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,LOW);
    }
    //Providing O/P to Row
    
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);    
    digitalWrite(latchPin,HIGH);    
    delay(5);    
  }
  
}
9  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 11, 2014, 02:46:27 pm
Yes. I did all. I tested all the connections and power etc. All seems fine, but unfortunately no O/P  smiley-sad
10  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 11, 2014, 02:13:44 pm
1. OE or Pin 13 oof 595: Nothing is connected to it. I tried it by connecting it to 5V (and GND) but nothing happened.

2. Anodes of LED to rows i.e. to 595. Cathodes to pin 4,5,6,7 of Arduino.

3. Just connected a 0.1uf between Pin 16 and GND.

4. Connection are as follows: Pin 13 of Arduino to Pin 11 (SHCP) of 595
                                                       Pin 11 of Arduino to Pin 14 (DS) of 595
                                                       Pin 10 of Arduino to Pin 12 (STCP) of 595
                                                 
11  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 11, 2014, 01:42:45 pm
The typo was in my code, not in your example. Sorry for that. But still, there is no O/P   smiley-neutral

I changed the line number of j=j+1 since I have declared j=0 above as global variable. Here is the code

Code:
#include <SPI.h>
int ssPin = 10;
int data[5]={15,20,20,15}; //For Letter A only
int j=0;
void setup()
{
  pinMode(ssPin,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);

}

void loop()

  if(j==4){j=0;}
  switch(j)
  {
    case 0:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
     break;
     
    case 1:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,LOW);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    break;
   
   
    case 2:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,LOW);
      digitalWrite(7,HIGH);
    break;
   
   
    case 3:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,LOW);
    break;
     
  }
  j=j+1;
  delay(8);
}
12  Using Arduino / LEDs and Multiplexing / Re: Displaying a letter in 8x5 LED Matrix on: August 11, 2014, 01:28:36 pm
I tried as you mentioned but none of the LED are glowing. All of them are plain OFF.

Blow is the code

Code:
#include <SPI.h>
int ssPin = 10;
int data[5]={15,20,20,15}; //For Letter A only
int j=0;
void setup()
{
  pinMode(ssPin,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);

}

void loop()
{
  j=j+1;
  if(j==0){j=0;}
  switch(j)
  {
    case 0:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
     break;
    
    case 1:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,LOW);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    break;
    
    
    case 2:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,LOW);
      digitalWrite(7,HIGH);
    break;
    
    
    case 3:
    digitalWrite(ssPin,LOW);
    SPI.transfer(data[j]);
    digitalWrite(ssPin,HIGH);
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,LOW);
    break;
      
  }
  delay(8);
}


PS: I am using current limiting resistors
13  Using Arduino / LEDs and Multiplexing / Displaying a letter in 8x5 LED Matrix on: August 11, 2014, 12:23:18 pm
I made a 8 column 5 row LED matrix of which I want to use 4 column and 5 row to display a letter 'A' I could somehow display the letter but things are not perfect because

1. The letter display (or LEDs for letter A) flickers a lot and
2. It would display (by flickering ) for few seconds and would remain OFF for the equal amount of time time. I failed to figure out why ?

I am using a IC 74HC595 to multiplex the row and scanning the column as evident from my sketch below.

Code:
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int data[5]={15,20,20,15}; //For Letter A only
void setup()
{
  pinMode(latchPin,OUTPUT);
  pinMode(clockPin,OUTPUT);
  pinMode(dataPin,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,OUTPUT);
  pinMode(7,OUTPUT);

}

void loop()
{
  for(int j=0;j<4;j++)
  {
    //Scanning Column
   
    if(j==0)
    {
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    }
    else if(j==1)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,LOW);
      digitalWrite(6,HIGH);
      digitalWrite(7,HIGH);
    }
    else if(j==2)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,LOW);
      digitalWrite(7,HIGH);
    }
    else if(j==3)
    {
      digitalWrite(4,HIGH);
      digitalWrite(5,HIGH);
      digitalWrite(6,HIGH);
      digitalWrite(7,LOW);
    }
    //Providing O/P to Row
   
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST,data[j]);   
    digitalWrite(latchPin,HIGH);   
    delay(40);     
  }
 
}


delay(40) is the best delay I could get to display my letter by still its imperfect.

PS: I searched this forum for similar queries but could not find any
14  Using Arduino / Programming Questions / Re: Can't upload sketch to Leonardo, 'ser_open()' error message on: January 03, 2014, 11:41:58 am
This issue is getting me frustrated. I tried every possible Troubleshooting..
Someone may please help me
15  Using Arduino / Programming Questions / Can't upload sketch to Leonardo, 'ser_open()' error message on: January 03, 2014, 03:48:56 am
I get the following error message while uploading sketch to the Leonardo board.

avrdude: ser_open(): can't open device "\\.\COM17": The system cannot find the file specified.


avrdude: ser_send(): write error: sorry no info avail

My Arduino Leonardo is connected to COM18 port. I have rightly selected Arduino Leonardo under 'Boards' and AVRISP mkII as the 'Programmer' Also selected the Serial port as COM18.

I also tried to upload the sketch by Pressing and Holding the Reset button and releasing it when the status shows 'Uploading. . .' but in that case I get the following error. Kindly help

Found programmer: Id = "B«J"; type =
 Software Version = .; Hardware Version = .
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
Pages: [1] 2