Help

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

More about the 5V dc supply

Avatar
duncan parker

Do all of the Ardbox units have the 5V dc output rated to 1.5A?

If this supply is used to drive a display (for example) does this limit the availability of any of the serial coms options (232 / 485 / SPI / I2C)?

1 Comment
Avatar
Discard
Avatar
Adam
-

how did you know the 5VDC output was rated to 1.5A? Where is the documentation that states this? Thank you

2 Answers
0
Best Answer

Hello Duncan,

No, you can use the pin 5V without losing any serial coms option, to get more info about the serial coms you can have a look to the user guide so you can see the configuration that you need to do to work of any of them ( RS - 485, RS - 232, SPI, I2C). Also i can show you an example of using I2C connecting an LiquidCrystal LCD and also the code of it. 


 
 

#include <Wire.h>

#include <LiquidCrystal_I2C.h>


#if defined(ARDUINO) && ARDUINO >= 100

#define printByte(args)  write(args);

#else

#define printByte(args)  print(args,BYTE);

#endif


uint8_t bell[8]  = {0x4,0xe,0xe,0xe,0x1f,0x0,0x4};

uint8_t note[8]  = {0x2,0x3,0x2,0xe,0x1e,0xc,0x0};

uint8_t clock[8] = {0x0,0xe,0x15,0x17,0x11,0xe,0x0};

uint8_t heart[8] = {0x0,0xa,0x1f,0x1f,0xe,0x4,0x0};

uint8_t duck[8]  = {0x0,0xc,0x1d,0xf,0xf,0x6,0x0};

uint8_t check[8] = {0x0,0x1,0x3,0x16,0x1c,0x8,0x0};

uint8_t cross[8] = {0x0,0x1b,0xe,0x4,0xe,0x1b,0x0};

uint8_t retarrow[8] = { 0x1,0x1,0x5,0x9,0x1f,0x8,0x4};

  

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display


void setup()

{

  lcd.init();                      // initialize the lcd 

  lcd.backlight();

  

  lcd.createChar(0, bell);

  lcd.createChar(1, note);

  lcd.createChar(2, clock);

  lcd.createChar(3, heart);

  lcd.createChar(4, duck);

  lcd.createChar(5, check);

  lcd.createChar(6, cross);

  lcd.createChar(7, retarrow);

  lcd.home();

    lcd.printByte(3);

  lcd.print("  INDUSTRIAL ");

    lcd.printByte(3);

  lcd.setCursor(0, 1);

  //lcd.print(" i ");

  lcd.printByte(3);

  lcd.print("  SHIELDS   ");

    lcd.printByte(3);

  delay(10000);

  displayKeyCodes();

  

}


// display all keycodes

void displayKeyCodes(void) {

  uint8_t i = 0;

  while (1) {

    lcd.clear();

    lcd.print("Codes 0x"); lcd.print(i, HEX);

    lcd.print("-0x"); lcd.print(i+16, HEX);

    lcd.setCursor(0, 1);

    for (int j=0; j<16; j++) {

      lcd.printByte(i+j);

    }

    i+=16;

    

    delay(4000);

  }

}


void loop()

{


}

Thank you, 

Best regards.

Avatar
Discard