Skip to content

Commit fb9cf51

Browse files
committed
Updated the LED Ring description
1 parent 310f7d6 commit fb9cf51

File tree

5 files changed

+128
-88
lines changed

5 files changed

+128
-88
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this repository there is a library collection of the DuPPa boards for the Arduino IDE.
44

5-
All the boards are available on [Tindie!](https://www.tindie.com/stores/Saimon/)
5+
All the boards are available on [DuPPa Store!](https://www.duppa.net/product-category/i2c-devices/)
66

77

88

@@ -12,7 +12,7 @@ Currently supported boards:
1212
- [I2C NavKey](https://github.com/Fattoresaimon/I2CNavKey) Library description [here](https://github.com/Fattoresaimon/ArduinoDuPPaLib/blob/master/examples/I2CNavKey/README.md)
1313
- [I2C Encoder Mini](https://github.com/Fattoresaimon/I2CEncoderMini) Library description [here](https://github.com/Fattoresaimon/ArduinoDuPPaLib/blob/master/examples/I2CEncoderMini/README.md)
1414
- [RGB LED Ring](https://github.com/Fattoresaimon/RGB_LED_Ring) Library description [here](https://github.com/Fattoresaimon/ArduinoDuPPaLib/blob/master/examples/RGB%20LED%20Ring/README.md)
15-
15+
- [RGB LED Ring Small](https://github.com/Fattoresaimon/RGB_LED_Ring_Small) Library description [here](https://github.com/Fattoresaimon/ArduinoDuPPaLib/blob/master/examples/RGB%20LED%20Ring%20Small/README.md)
1616

1717

1818
## Installation

examples/RGB LED Ring Small/LEDRingSmall_Demo/LEDRingSmall_Demo.ino

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@
22
#include "LEDRingSmall.h"
33

44
/*
5-
6-
Connections with Arduino UNO:
7-
- -> GND
8-
+ -> 5V
9-
SDA -> A4
10-
SCL -> A5
11-
INT -> A3
5+
Board Pinout
6+
+-----+--------+----------+-------------+
7+
| Pin | Color | Function | Arduino pin |
8+
+-----+--------+----------+-------------+
9+
| 1 | Red | VCC | +5V |
10+
| 2 | Black | GND | GND |
11+
| 3 | Yellow | VIO | +5V |
12+
| 4 | Green | SDA | A4 |
13+
| 5 | Blue | SCL | A5 |
14+
+-----+--------+----------+-------------+
1215
*/
16+
1317
const uint32_t fade1_table[24] = {0x8011EE, 0xA004DA, 0xBF00BF, 0xDA04A0, 0xEE1180, 0xFB255F, 0xFF4040, 0xFB5F25, 0xEE8011, 0xDAA004, 0xBFBF00, 0xA0DA04, 0x80EE11, 0x5FFB25, 0x40FF40, 0x25FB5F, 0x11EE80, 0x04DAA0, 0x00BFBF, 0x04A0DA, 0x1180EE, 0x255FFB, 0x4040FF, 0x5F25FB};
1418
const uint32_t fade2_table[24] = {0xFF0000, 0xFF0004, 0xFF0020, 0xFF006B, 0xFF00FF, 0x6B00FF, 0x2000FF, 0x0400FF, 0x0000FF, 0x0004FF, 0x0020FF, 0x006BFF, 0x00FFFF, 0x00FF6B, 0x00FF20, 0x00FF04, 0x00FF00, 0x04FF00, 0x20FF00, 0x6BFF00, 0xFFFF00, 0xFF6B00, 0xFF2000, 0xFF0400};
1519
static uint8_t j = 0;
1620
static uint8_t i = 0;
1721
static uint16_t tim = 0;
1822
static uint8_t r = 5, g = 8, b = 20, rg = 40, br = 35, bg = 17;
1923

20-
LEDRingSmall LEDRingSmall(0x60);
24+
LEDRingSmall LEDRingSmall(ISSI3746_SJ2 | ISSI3746_SJ7);//Only SJ2 and SJ7 are soldered in this example
25+
// Also check if there are the pull-UP resistors on the I2C bus. If no or the board doesn't want to work please also solder the jumper SJ9
2126

2227
void setup(void) {
2328

Lines changed: 60 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,82 @@
1-
# RGB LED Ring Arduino Library
1+
# RGB LED Ring Small Arduino Library
22

33
--------------------------------------------------------------------------------
44

55
## Introduction
66

7-
Here you can find the library description of the [RGB LED Ring](https://github.com/Fattoresaimon/RGB_LED_Ring) for the Arduino IDE.
8-
The RGB LED Ring is based on the driver ISSI [IS31FL3737 ](http://www.issi.com/WW/pdf/31FL3737.pdf), for more functionality please check the datasheet of the driver.
7+
Here you can find the project description of the [RGB LED Ring Small](https://github.com/Fattoresaimon/RGB_LED_Ring_Small).
8+
The RGB LED Ring is based on the driver ISSI [IS31FL3746A](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf), for more functionality please check the datasheet of the driver.
99
At the moment the breathing effect are not implemented.
1010

11-
The RGB LED Ring is available on [Tindie!]( https://www.tindie.com/products/20279/)
11+
The RGB LED Ring is available on [DuPPa Store!](https://www.duppa.net/shop/rgb-led-ring-small/)
1212

1313
## Initialization of the class
1414

15-
The library makes available the class **LEDRing**
16-
To initialize the library, you have to declare an instance of the class **LEDRing** for each LED Ring.
15+
The library makes available the class **LEDRingSmall**
16+
To initialize the library, you have to declare an instance of the class **LEDRingSmall** for each LED Ring.
1717
For example:
1818

1919
``` C++
20-
LEDRing LEDRing(0x5A);
20+
LEDRingSmall LEDRingSmall(ISSI3746_SJ2 | ISSI3746_SJ7);
2121
```
22-
Declaration of the RGB LED Ring with the jumper 0x5A soldered
22+
Declaration of the RGB LED Ring with the jumper SJ2 and SJ7 soldered.
23+
The RGB LED Ring v1.1 it have 8 Jumpers for setting the address, they are divided in 2 groups of 4 jumpers. Only 1 jumper per group should be soldered, this make 16 possible combinations.
24+
Possible combination are the following:
25+
26+
| Jumper first group | Jumper second group | I2C Address |
27+
| ------------ | ------------ | :--: |
28+
| ISSI3746_SJ1 | ISSI3746_SJ5 | 0x60 |
29+
| ISSI3746_SJ2 | ISSI3746_SJ5 | 0x62 |
30+
| ISSI3746_SJ3 | ISSI3746_SJ5 | 0x64 |
31+
| ISSI3746_SJ4 | ISSI3746_SJ5 | 0x66 |
32+
| ISSI3746_SJ1 | ISSI3746_SJ6 | 0x68 |
33+
| ISSI3746_SJ2 | ISSI3746_SJ6 | 0x6A |
34+
| ISSI3746_SJ3 | ISSI3746_SJ6 | 0x6C |
35+
| ISSI3746_SJ4 | ISSI3746_SJ6 | 0x6E |
36+
| ISSI3746_SJ1 | ISSI3746_SJ7 | 0x70 |
37+
| ISSI3746_SJ2 | ISSI3746_SJ7 | 0x72 |
38+
| ISSI3746_SJ3 | ISSI3746_SJ7 | 0x74 |
39+
| ISSI3746_SJ4 | ISSI3746_SJ7 | 0x76 |
40+
| ISSI3746_SJ1 | ISSI3746_SJ8 | 0x78 |
41+
| ISSI3746_SJ2 | ISSI3746_SJ8 | 0x7A |
42+
| ISSI3746_SJ3 | ISSI3746_SJ8 | 0x7C |
43+
| ISSI3746_SJ4 | ISSI3746_SJ8 | 0x7E |
44+
2345
2446
2547
## Configuration
2648
27-
### void LEDRing_Reset(void)
28-
Reset all the IS31FL3737 to the default state
49+
### void LEDRingSmall_Reset(void)
50+
Reset all the IS31FL3746A to the default state
2951
3052
### void LEDRing_Configuration(uint8_t conf)
31-
This method write the register ad the address 00h of the IS31FL3737. Please refer the datasheet for further information.
53+
This method write the register ad the address 50h of the IS31FL3746A. Please refer the datasheet for further information.
3254
3355
### void LEDRing_GlobalCurrent(uint8_t conf)
34-
This method write the register 01h and it set the LEDs current.
56+
This method write the register 51h and it set the LEDs current.
3557
It's possible to set up to 256 step from 0 to 0xFF.
3658
Higher value make the LEDs brighter.
3759
38-
### void LEDRing_PULLUP(uint8_t pull)
39-
### void LEDRing_PULLDOWN(uint8_t pull)
40-
Configure the PULLUP or PULLDOWN resistor.
41-
This resistor are used for avoid the "ghost" effect in a matrix LED architecture.
42-
The possible value are the following:
43-
44-
| PUR / PDR | Value |
45-
| :--: | ---- |
46-
| 000 | No pull-up resistor |
47-
| 001 | 0.5kΩ |
48-
| 010 | 1.0kΩ |
49-
| 011 | 2.0kΩ |
50-
| 100 | 4.0kΩ |
51-
| 101 | 8.0kΩ |
52-
| 110 | 16kΩ |
53-
| 111 | 32kΩ |
54-
55-
### void LEDRing_EnableAllOutput(void)
56-
This method enable all the LEDs, by default the LEDs are disabled.
57-
58-
### void LEDRing_DisableAllOutput(void)
59-
This method disable all the LEDs.
60+
### void LEDRing_SetScaling(uint8_t led_n, uint8_t scal);
61+
Set the output current of each single color led. **n** is the LED number ( 1 to 72 ), **scal** is the scaling value (0 to 256)
62+
63+
### void LEDRing_SetScaling(uint8_t scal);
64+
Set the output current of all LED. **scal** is the scaling value (0 to 256)
65+
66+
### void LEDRing_PULLUP_DOWN(uint8_t pull)
67+
Configure the PULLUP and PULLDOWN resistor. You can refer to the IS31FL3746A datasheet at the 52h register for further information.
68+
69+
### void LEDRingSmall_SpreadSpectrum(uint8_t spread);
70+
Enable and configure the spread spectrum functionality. You can refer to the IS31FL3746A datasheet at the 60h register for further information.
71+
72+
### void LEDRingSmall_PWMFrequencyEnable(uint8_t PWMenable);
73+
Enable or Disable the PWM output. Write 1 for enable the PWM output, write 0 for disable the PWM output.
74+
75+
### void LEDRingSmall_PWMFrequencySetting(uint8_t pwmfreq);
76+
Configure the PWM frequency. It's possible to configure the PWM frequency from 29kHz to 453Hz. You can refer to the IS31FL3746A datasheet at the E2h register for further information.
77+
78+
### uint8_t LEDRing_Temperature(void);
79+
Get the temperature status register. Refer to the IS31FL3746A datasheet at the 24h register for further information.
6080
6181
### void LEDRing_PWM_MODE(void)
6282
This method set all the LEDs in PWM mode.
@@ -66,25 +86,25 @@ This method set the PWM value to 0 for each LED.
6686
6787
### void LEDRing_Set_RGB(uint8_t led_n, uint32_t color)
6888
Set the RGB color for a specific LED.
69-
**n** is the LED number ( 0 to 47 ), while the **color** is the RGB color in 24bit format.
89+
**n** is the LED number ( 0 to 23 ), while the **color** is the RGB color in 24bit format.
7090
7191
#### Examples:
7292
7393
```C++
74-
LEDRing.LEDRing_Set_RGB(10, 0xFF9933);
94+
LEDRingSmall.LEDRingSmall_Set_RGB(10, 0xFF9933);
7595
```
7696

7797
### void LEDRing_Set_RED(uint8_t led_n, uint8_t color)
7898
### void LEDRing_Set_GREEN(uint8_t led_n, uint8_t color)
7999
### void LEDRing_Set_BLUE(uint8_t led_n, uint8_t color)
80100

81101
Set a specific color to a specific LED
82-
**n** is the LED number ( 0 to 47 ), while the **color** is the color in 8bit format.
102+
**n** is the LED number ( 0 to 24 ), while the **color** is the color in 8bit format.
83103

84104
#### Examples:
85105

86106
```C++
87-
LEDRing.LEDRing_Set_RED(4, 128);
88-
LEDRing.LEDRing_Set_GREEN(5, 200);
89-
LEDRing.LEDRing_Set_BLUE(6, 80);
107+
LEDRingSmall.LEDRingSmall_Set_RED(4, 128);
108+
LEDRingSmall.LEDRingSmall_Set_GREEN(5, 200);
109+
LEDRingSmall.LEDRingSmall_Set_BLUE(6, 80);
90110
```

examples/RGB LED Ring/LEDRing_Demo/LEDRing_Demo.ino

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44

55
/*
6-
7-
Connections with Arduino UNO:
8-
- -> GND
9-
+ -> 5V
10-
SDA -> A4
11-
SCL -> A5
12-
INT -> A3
6+
Board Pinout
7+
+-----+--------+----------+-------------+
8+
| Pin | Color | Function | Arduino pin |
9+
+-----+--------+----------+-------------+
10+
| 1 | Red | VCC | +5V |
11+
| 2 | Black | GND | GND |
12+
| 3 | Yellow | VIO | +5V |
13+
| 4 | Green | SDA | A4 |
14+
| 5 | Blue | SCL | A5 |
15+
+-----+--------+----------+-------------+
1316
*/
1417

1518
const uint32_t fade1_table[48] = {0x8011EE, 0x900AE5, 0xA004DA, 0xB001CD, 0xBF00BF, 0xCD01B0, 0xDA04A0, 0xE50A90, 0xEE1180, 0xF51A6F, 0xFB255F, 0xFE324F, 0xFF4040, 0xFE4F32, 0xFB5F25, 0xF56F1A, 0xEE8011, 0xE5900A, 0xDAA004, 0xCDB001, 0xBFBF00, 0xB0CD01, 0xA0DA04, 0x90E50A, 0x80EE11, 0x6FF51A, 0x5FFB25, 0x4FFE32, 0x40FF40, 0x32FE4F, 0x25FB5F, 0x1AF56F, 0x11EE80, 0x0AE590, 0x04DAA0, 0x01CDB0, 0x00BFBF, 0x01B0CD, 0x04A0DA, 0x0A90E5, 0x1180EE, 0x1A6FF5, 0x255FFB, 0x324FFE, 0x4040FF, 0x4F32FE, 0x5F25FB, 0x6F1AF5, };
@@ -19,7 +22,8 @@ static uint8_t i = 0;
1922
static uint16_t tim = 0;
2023
static uint8_t r = 5, g = 8, b = 20, rg = 40, br = 35, bg = 17;
2124

22-
LEDRing LEDRing(ISSI3745_SJ1 | ISSI3745_SJ5);
25+
LEDRing LEDRing(ISSI3745_SJ1 | ISSI3745_SJ5); //Only SJ1 and SJ5 are soldered in this example
26+
// Also check if there are the pull-UP resistors on the I2C bus. If no or the board doesn't want to work please also solder the jumper SJ9
2327

2428
void setup(void) {
2529

@@ -173,4 +177,4 @@ void loop() {
173177
delay(1000);
174178
LEDRing.LEDRing_PWM_MODE();
175179

176-
}
180+
}

examples/RGB LED Ring/README.md

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
## Introduction
66

7-
Here you can find the library description of the [RGB LED Ring](https://github.com/Fattoresaimon/RGB_LED_Ring) for the Arduino IDE.
8-
The RGB LED Ring is based on the driver ISSI [IS31FL3737 ](http://www.issi.com/WW/pdf/31FL3737.pdf), for more functionality please check the datasheet of the driver.
7+
Here you can find the project description of the [RGB LED Ring Small](https://github.com/Fattoresaimon/RGB_LED_Ring).
8+
The RGB LED Ring is based on the driver ISSI [IS31FL3745](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf), for more functionality please check the datasheet of the driver.
99
At the moment the breathing effect are not implemented.
1010

11-
The RGB LED Ring is available on [Tindie!]( https://www.tindie.com/products/20279/)
11+
The RGB LED Ring is available on [DuPPa Store!](https://www.duppa.net/shop/rgb-led-ring/)
1212

1313
## Initialization of the class
1414

@@ -17,46 +17,57 @@ To initialize the library, you have to declare an instance of the class **LEDRin
1717
For example:
1818

1919
``` C++
20-
LEDRing LEDRing(0x5A);
20+
LEDRing LEDRing(ISSI3745_SJ1 | ISSI3745_SJ5);
2121
```
22-
Declaration of the RGB LED Ring with the jumper 0x5A soldered
22+
Declaration of the RGB LED Ring with the jumper SJ1 and SJ5 soldered.
23+
The RGB LED Ring v1.1 it have 8 Jumpers for setting the address, they are divided in 2 groups of 4 jumpers. Only 1 jumper per group should be soldered, this make 16 possible combinations.
24+
Possible combination are the following:
25+
26+
| Jumper first group | Jumper second group | I2C Address |
27+
| ------------ | ------------ | :--: |
28+
| ISSI3745_SJ1 | ISSI3745_SJ5 | 0x40 |
29+
| ISSI3745_SJ2 | ISSI3745_SJ5 | 0x42 |
30+
| ISSI3745_SJ3 | ISSI3745_SJ5 | 0x44 |
31+
| ISSI3745_SJ4 | ISSI3745_SJ5 | 0x46 |
32+
| ISSI3745_SJ1 | ISSI3745_SJ6 | 0x48 |
33+
| ISSI3745_SJ2 | ISSI3745_SJ6 | 0x4A |
34+
| ISSI3745_SJ3 | ISSI3745_SJ6 | 0x4C |
35+
| ISSI3745_SJ4 | ISSI3745_SJ6 | 0x4E |
36+
| ISSI3745_SJ1 | ISSI3745_SJ7 | 0x50 |
37+
| ISSI3745_SJ2 | ISSI3745_SJ7 | 0x52 |
38+
| ISSI3745_SJ3 | ISSI3745_SJ7 | 0x54 |
39+
| ISSI3745_SJ4 | ISSI3745_SJ7 | 0x56 |
40+
| ISSI3745_SJ1 | ISSI3745_SJ8 | 0x58 |
41+
| ISSI3745_SJ2 | ISSI3745_SJ8 | 0x5A |
42+
| ISSI3745_SJ3 | ISSI3745_SJ8 | 0x5C |
43+
| ISSI3745_SJ4 | ISSI3745_SJ8 | 0x5E |
44+
2345
2446
2547
## Configuration
2648
2749
### void LEDRing_Reset(void)
28-
Reset all the IS31FL3737 to the default state
50+
Reset all the IS31FL3745 to the default state
2951
3052
### void LEDRing_Configuration(uint8_t conf)
31-
This method write the register ad the address 00h of the IS31FL3737. Please refer the datasheet for further information.
53+
This method write the register ad the address 00h of the IS31FL3745. Please refer the datasheet for further information.
3254
3355
### void LEDRing_GlobalCurrent(uint8_t conf)
3456
This method write the register 01h and it set the LEDs current.
3557
It's possible to set up to 256 step from 0 to 0xFF.
3658
Higher value make the LEDs brighter.
3759
38-
### void LEDRing_PULLUP(uint8_t pull)
39-
### void LEDRing_PULLDOWN(uint8_t pull)
40-
Configure the PULLUP or PULLDOWN resistor.
41-
This resistor are used for avoid the "ghost" effect in a matrix LED architecture.
42-
The possible value are the following:
43-
44-
| PUR / PDR | Value |
45-
| :--: | ---- |
46-
| 000 | No pull-up resistor |
47-
| 001 | 0.5kΩ |
48-
| 010 | 1.0kΩ |
49-
| 011 | 2.0kΩ |
50-
| 100 | 4.0kΩ |
51-
| 101 | 8.0kΩ |
52-
| 110 | 16kΩ |
53-
| 111 | 32kΩ |
54-
55-
### void LEDRing_EnableAllOutput(void)
56-
This method enable all the LEDs, by default the LEDs are disabled.
57-
58-
### void LEDRing_DisableAllOutput(void)
59-
This method disable all the LEDs.
60+
### void LEDRing_SetScaling(uint8_t led_n, uint8_t scal);
61+
Set the output current of each led. **n** is the LED number ( 1 to 144 ), **scal** is the scaling value (0 to 256)
62+
63+
### void LEDRing_SetScaling(uint8_t scal);
64+
Set the output current of all LED. **scal** is the scaling value (0 to 256)
65+
66+
### void LEDRing_PULLUP_DOWN(uint8_t pull)
67+
Configure the PULLUP and PULLDOWN resistor. You can refer to the IS31FL3745 datasheet at the 02h register for further information.
68+
69+
### uint8_t LEDRing_Temperature(void);
70+
Get the temperature status register. Refer to the IS31FL3745 datasheet at the 24h register for further information.
6071
6172
### void LEDRing_PWM_MODE(void)
6273
This method set all the LEDs in PWM mode.

0 commit comments

Comments
 (0)