Arduino UNO Adafruit Display Project


hello everyone,

i have project finished need couple of issues (also wanted share project if finds interesting)

essentially, have 13 displays controlled on i2c. have 2 arduino uno can have maximum of 8 displays on 1 bus (i given arduino employers, said better rather bit banging way 13 on 1 bus. i'm doing project in internship)

so 2 buses: 7 displays , 6 displays, data coming array called data[] in each programme.

i given text file real data inside soon. need find way data arrays in code. have had online explaining me can make sense of all.

i need find way have master slave setup 2 arduino's, thinking of having digital pinout going master slave , having slave waiting rising edge , iterating 'loop' once using while or if statement. think that?

code: [select]

#include <wire.h>
#include "adafruit_ledbackpack.h"
#include "adafruit_gfx.h"
 
adafruit_7segment segment[6];

int address[6]={112,113,114,115,116,117};  // having file written 7 displays

int data[10][6] =
{
  {1,2,3,4,5,6},
  {7,8,9,10,11,12},
  {13,14,15,16,17,18},
  {19,20,21,22,23,24},
  {25,26,27,28,29,30},
  {31,32,33,34,35,36},        //arbitrary numbers used here
  {37,38,39,40,41,42},
  {43,44,45,46,47,48},
  {49,50,51,52,53,54},
  {55,56,57,58,59,60}
};

void setup()
{
  #ifndef __avr_attiny85__
  serial.begin(9600);
  #endif

  (int i=0;i<6;i++)
  {
    segment[i]=adafruit_7segment();
    segment[i].setbrightness(10);
    segment[i].begin(address[i]);
  }
 
}

void loop()
{
  (int k=0; k<10; k++){
    (int i=0; i<6; i++)
    {
      segment[i].print(data[k][i]);
      segment[i].writedisplay();
      delay(10);
    }
    delay(2000);   //this time delay irrelevant, did ease of viewing
  }   
}


thanks replies.

it's bit late in day, if used uno v4 2 i2c buses on same board massively simplify this:

https://www.elektormagazine.com/labs/elektorino-uno-r4-150790 


Arduino Forum > Using Arduino > Project Guidance > Arduino UNO Adafruit Display Project


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'