File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
firmware/Serial 7-Segment Display/Arduino_Examples Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
This is example code that shows how to send data over I2C to the display.
11
11
12
+ Please Note: 0x71 is the 7-bit I2C address. If you are using a different language than Arduino you will probably
13
+ need to add the Read/Write bit to the end of the address. This means the default read address for the OpenSegment
14
+ is 0b.1110.0011 or 0xE3 and the write address is 0b.1110.0010 or 0xE2.
15
+ For more information see https://learn.sparkfun.com/tutorials/i2c
16
+
12
17
Note: This code expects the display to be listening at the default I2C address. If your display is not at 0x71, you can
13
18
do a software or hardware reset. See the Wiki for more info:
14
19
http://github.com/sparkfun/Serial7SegmentDisplay/wiki/Special-Commands
18
23
A4 to SDA
19
24
VIN to PWR
20
25
GND to GND
26
+
27
+ For this example pull up resistors are not needed on SDA and SCL. If you have other devices on the
28
+ I2C bus then 4.7k pull up resistors are recommended.
29
+
30
+ OpenSegment will work at 400kHz Fast I2C. Use the .setClock() call shown below to set the data rate
31
+ faster if needed.
21
32
22
33
*/
23
34
@@ -31,6 +42,9 @@ void setup()
31
42
{
32
43
Wire.begin (); // Join the bus as master
33
44
45
+ // By default .begin() will set I2C SCL to Standard Speed mode of 100kHz
46
+ // Wire.setClock(400000); //Optional - set I2C SCL to High Speed Mode of 400kHz
47
+
34
48
Serial.begin (9600 ); // Start serial communication at 9600 for debug statements
35
49
Serial.println (" OpenSegment Example Code" );
36
50
Original file line number Diff line number Diff line change 8
8
Serial7Segment is an open source seven segment display.
9
9
10
10
This is example code that shows how to control the brightness level of the display over I2C.
11
+
12
+ Please Note: 0x71 is the 7-bit I2C address. If you are using a different language than Arduino you will probably
13
+ need to add the Read/Write bit to the end of the address. This means the default read address for the OpenSegment
14
+ is 0b.1110.0011 or 0xE3 and the write address is 0b.1110.0010 or 0xE2.
15
+ For more information see https://learn.sparkfun.com/tutorials/i2c
11
16
12
17
Note: This code expects the display to be listening at the default I2C address. If your display is not at 0x71, you can
13
18
do a software or hardware reset. See the Wiki for more info:
19
24
VIN to PWR
20
25
GND to GND
21
26
27
+ For this example pull up resistors are not needed on SDA and SCL. If you have other devices on the
28
+ I2C bus then 4.7k pull up resistors are recommended.
29
+
30
+ OpenSegment will work at 400kHz Fast I2C. Use the .setClock() call shown below to set the data rate
31
+ faster if needed.
32
+
22
33
*/
23
34
24
35
#include < Wire.h>
@@ -29,6 +40,9 @@ void setup()
29
40
{
30
41
Wire.begin (); // Join the bus as master
31
42
43
+ // By default .begin() will set I2C SCL to Standard Speed mode of 100kHz
44
+ // Wire.setClock(400000); //Optional - set I2C SCL to High Speed Mode of 400kHz
45
+
32
46
Serial.begin (9600 ); // Start serial communication at 9600 for debug statements
33
47
Serial.println (" OpenSegment Example Code" );
34
48
You can’t perform that action at this time.
0 commit comments