Lattepanda Delta Port abnormal.

userHead Jace 2020-11-05 10:28:19 993 Views1 Replies
hello.
i use lattepanda delta
I am receiving input using Latepanda port. There is no problem with INPUT/OUTPUT using Arduino, but there is a problem with INPUT using Visual Studio C#. Digital Read do not work on ports (only D10-13 PORT Work, other Port do not work.) but actual power is in an accredited state.
The code I used is as follows.
Is there a problem here?

visual studio c#--------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using LattePanda.Firmata;

namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
private Arduino arduino = new Arduino();
public Form1()
{
InitializeComponent();
arduino.pinMode(0, Arduino.INPUT);
arduino.pinMode(1, Arduino.INPUT);
arduino.pinMode(2, Arduino.INPUT);
arduino.pinMode(3, Arduino.INPUT);
arduino.pinMode(4, Arduino.INPUT);
arduino.pinMode(5, Arduino.INPUT);
arduino.pinMode(6, Arduino.INPUT);
arduino.pinMode(7, Arduino.INPUT);
arduino.pinMode(8, Arduino.INPUT);
arduino.pinMode(9, Arduino.INPUT);
arduino.pinMode(10, Arduino.INPUT);
arduino.pinMode(11, Arduino.INPUT);
arduino.pinMode(12, Arduino.INPUT);
arduino.pinMode(13, Arduino.INPUT);
arduino.pinMode(18, Arduino.INPUT);
arduino.pinMode(19, Arduino.INPUT);
arduino.pinMode(20, Arduino.INPUT);
arduino.pinMode(21, Arduino.INPUT);
arduino.pinMode(22, Arduino.INPUT);
arduino.pinMode(23, Arduino.INPUT);

}

private void button1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}

private void button2_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
}

private void timer1_Tick(object sender, EventArgs e)
{
label1.Text = Convert.ToString(arduino.digitalRead(7));
label2.Text = Convert.ToString(arduino.digitalRead(8));
label3.Text = Convert.ToString(arduino.digitalRead(9));
label4.Text = Convert.ToString(arduino.digitalRead(10));
label5.Text = Convert.ToString(arduino.digitalRead(11));
label6.Text = Convert.ToString(arduino.digitalRead(12));
label7.Text = Convert.ToString(arduino.digitalRead(13));
label8.Text = Convert.ToString(arduino.digitalRead(21));
label9.Text = Convert.ToString(arduino.digitalRead(22));
label10.Text = Convert.ToString(arduino.digitalRead(23));
label11.Text = Convert.ToString(arduino.digitalRead(0));
label12.Text = Convert.ToString(arduino.digitalRead(1));
label13.Text = Convert.ToString(arduino.digitalRead(2));
label14.Text = Convert.ToString(arduino.digitalRead(3));
label15.Text = Convert.ToString(arduino.digitalRead(4));
label16.Text = Convert.ToString(arduino.digitalRead(5));
label17.Text = Convert.ToString(arduino.digitalRead(6));
label18.Text = Convert.ToString(arduino.digitalRead(18));
label19.Text = Convert.ToString(arduino.digitalRead(19));
label20.Text = Convert.ToString(arduino.digitalRead(20));
}
}
}

arduino => firmata standard use.

comment please Thank you