-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
An indexoutofrange exception is raised when setting A5 on Arduino Uno to
digital input or output.
I've traced the exception and came up with a solution. The problem is caused by
the Handle(DigitalMessage message) function in EasyFirmata.cs
Modified code that works:
public void Handle(DigitalMessage message)
{
var pinStart = (byte)(8*message.Port);
for (byte i = 0; i < 8; i++)
{
int index = i + pinStart;
if (index < Pins.Count) Pins[index].CurrentValue = message.PinStates[i] ? 1 : 0;
}
OnNewDigitalValue(message.Port,message.PinStates);
}
Original issue reported on code.google.com by ruzsinszki.gabor
on 21 May 2013 at 11:40