Example application for two 16x8 Adafruit LED Backpacks to make a 32 x 8 matrix.
Dependencies: Adafruit_32x8matrix
Fork of Adafruit_LEDBackpack_16x8_App by
main.cpp
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #include "mbed.h" 00018 00019 #include "Adafruit_32x8matrix.h" 00020 00021 #define I2C_ADDR1 0x70 00022 #define I2C_ADDR2 0x71 00023 #define ROTATION1 0 00024 #define ROTATION2 2 00025 #define BRIGHTNESS 1 00026 00027 I2C i2c(D14, D15); 00028 00029 Adafruit_32x8matrix matrix(&i2c, I2C_ADDR1, I2C_ADDR2, ROTATION1, ROTATION2, BRIGHTNESS); 00030 00031 int main() { 00032 char buffer [50]; 00033 00034 while(1) 00035 { 00036 snprintf(buffer, 50, "Hi, how are you today?\0"); //pass in max chars to prevent overflow 00037 matrix.playText(buffer,strlen(buffer), 1); 00038 00039 Thread::wait(10000); 00040 } 00041 00042 }
Generated on Thu Jul 28 2022 14:22:47 by
1.7.2
