Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago. This question has been closed. Reason: Off Topic
LED不点灯の原因が分かりません
添付画像の回路で、8×6のLEDを点灯させたいのですが 前箇所を点灯させる事はできるのに、一か所でも不点灯にすると(コードの"0xF0"のように) 一行まるごと点灯しない結果になってしまいました。 原因等分かる方いましたら、教えて頂けないでしょうか。
※回路の狙いとしては、mbedから出た信号をトリガーとして、9.5Vの電圧をLEDに 掛け、点灯に必要な電圧を確保する。
#include "mbed.h" Ticker flipper; BusOut Col(dp3,dp6,dp7,dp8,dp9,dp10); BusOut Row(dp15,dp16,dp17,dp18,dp19,dp20,dp21,dp22); const uint8_t pt[8] = { 0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF }; void flip(){ static int col = 0; Row = 0; Col = pt[col]; Row = 1 << col; col++; col %= 8; } int main() { flipper.attach(&flip,0.2); while(1) { } }