FoieDEEEE_仲敬 发表于 2013-6-10 11:53:48

【展示】Arduino 8*8点阵控制

先来个图
视频在此!:http://v.youku.com/v_show/id_XNTY4NzMxOTk2.html

Arduino代码://LEDs Pins Option
const int leds = {6, 7, 8, 9, 10, 11, 12, 13};
const int gnds = {14, 15, 16, 17, 5, 4, 3, 2};

const int rxled = 19;

int Status =
{
    {'0', '0', '0', '0', '0', '0', '0', '0'},
    {'1', '0', '0', '1', '0', '1', '1', '0'},
    {'1', '1', '0', '1', '1', '0', '0', '1'},
    {'1', '0', '1', '1', '1', '0', '0', '1'},
    {'1', '0', '0', '1', '0', '1', '1', '0'},
    {'0', '0', '0', '0', '0', '0', '0', '0'},
    {'1', '1', '1', '1', '1', '1', '1', '1'},
    {'0', '0', '0', '0', '0', '0', '0', '0'}
};

void setup()
{
    //LEDs Pin Mode Option
    for (int i = 0; i < 8; i++)
    {
      pinMode(leds, OUTPUT);
      pinMode(gnds, OUTPUT);
      digitalWrite(gnds, HIGH);
    }
    pinMode(rxled, OUTPUT);
    Serial.begin(115200);
    TestLEDRow();
    TestLEDCol();
}

void loop()
{
    if (Serial.available() > 0)
    {
      delayMicroseconds(6100);
      for (int i = 0; i < 8; i++)
      {
            for(int j = 0; j < 8; j++)
            {
                Status = Serial.read();
                if (Status == -1)
                {
                  Status = '0';
                }
                if (i * j == 64)
                {
                  if (Serial.available() != 0)
                  {
                        Serial.print("ERROR");
                  }
                }
            }
      }
      Serial.flush();
    }

    for (int i = 0; i < 8; i++)
    {
      digitalWrite(leds, LOW);
      for (int j = 0; j < 8; j++)
      {
            if (Status == '1')
            {
                digitalWrite(gnds, HIGH);
                delayMicroseconds(100);
                digitalWrite(gnds, LOW);
                delayMicroseconds(100);
            }
            if (Status == '0')
            {
                digitalWrite(gnds, LOW);
            }
      }
      digitalWrite(leds, HIGH);
    }
}

void TestLEDRow()
{
    for (int i = 0; i < 8; i++)
    {
      digitalWrite(gnds, HIGH);
      for (int j = 0; j < 8; j++)
      {
            digitalWrite(leds, LOW);
            delay(20);
            digitalWrite(leds, HIGH);
            delay(20);
      }
      digitalWrite(gnds, LOW);
    }
}

void TestLEDCol()
{
    for (int i = 0; i < 8; i++)
    {
      digitalWrite(leds, LOW);
      for (int j = 0; j < 8; j++)
      {
            digitalWrite(gnds, HIGH);
            delay(20);
            digitalWrite(gnds, LOW);
            delay(20);
      }
      digitalWrite(leds, HIGH);
    }
}

糯米基 发表于 2013-6-12 15:15:50

上位机软件介绍一下,或给出个地址呗

yaoze权 发表于 2013-6-13 17:09:33

上位机软件介绍一下,或给出个地址呗

FoieDEEEE_仲敬 发表于 2013-6-13 20:44:40

http://pan.baidu.com/share/link?shareid=203212430&uk=3406645061 驱动器
http://pan.baidu.com/share/link?shareid=205244907&uk=3406645061 动画编辑器
由于是自己用VB.net编的,所以要安装.net Frame Work 3.5 以上版本
运行:双击setup.exe即可

elyar19 发表于 2014-2-26 15:18:18

喜欢。 要是能在手机上控制点阵的话可好了‘

suoma 发表于 2015-4-20 18:06:09

             字模软件可否分享一下?

yqfans 发表于 2015-11-4 11:36:02

本帖最后由 yqfans 于 2015-11-5 15:00 编辑

赞一个!赞一个!

yqfans 发表于 2015-11-5 15:02:39

FoieDEEEE_仲敬 发表于 2013-6-13 20:44 static/image/common/back.gif
http://pan.baidu.com/share/link?shareid=203212430&uk=3406645061 驱动器
http://pan.baidu.com/share/l ...

你好,为什么我电脑上装了.net4.0,可是安装不了你的这个软件,说是没有.net,无法安装,是怎么回事?
页: [1]
查看完整版本: 【展示】Arduino 8*8点阵控制