Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

Commit

Permalink
bugfix pin number of event "digital_read" shokai#38
Browse files Browse the repository at this point in the history
  • Loading branch information
shokai committed May 8, 2014
1 parent a17f58f commit bf83d33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/arduino_firmata/arduino.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def process_input
@digital_input_data[@multi_byte_channel] = input_data
0.upto(13).each do |i|
next unless (0x01 << i) & diff > 0
emit :digital_read, i, (input_data & diff > 0)
emit :digital_read, i+@multi_byte_channel*8, (input_data & diff > 0)
end
when ANALOG_MESSAGE
analog_value = (@stored_input_data[0] << 7) + @stored_input_data[1]
Expand Down

0 comments on commit bf83d33

Please sign in to comment.