Is Arduino Mega support built-in?
bcarroll opened this issue · 3 comments
I haven't actually tried interfacing an Arduino Mega using this module, but does the Device::Firmata module include support for the Arduino Mega boards?
I noticed this line in the Constants.pm file, but didn't see anything else board specific.
$DEVICES = { 'arduino_dumilanove' => {}, };
perl-firmata is not board-specific in any way I'm aware of (The arduino's firmata firmware is though...). It pulls the board specific metadata at startup (given you are running on a recent version of firmata), so it omits setting unsupported pinmodes based on the firmata-version running on the board with little prior knowlege. I'm using it with Arduino Uno, Mega 2560 and Nano.
This line seems to be a leftover from the early days of perl-firmata (added by Ako Mimoto back in 2010). I'm not aware it's being used or even refereced from anywhere in the code.
Hey! I'm getting these updates! =)
@ntruchsess is correct: Back in the early days, firmata didn't provide a method to probe for a device's capabilities. The "idea" was that board specific stuff could be stored and pulled up as required but I developed with only a dumilanove at the time. Looks like at this point @ntruchsess has taken it much further than I had (thanks!)
Thanks for the feedback. I have been experimenting with Device::Firmata (Windows XP/ActivePerl 5.10) on an Arduino Nano v3. I forked the repo and made some changes to get it working. I haven't done a lot of tests, but the blink and test examples seem to be working as they should. I issued a pull request to the dev branch with the changes I made to get Device::Firmata working on Windows.
I am hoping to incorporate Device::Firmata into a robotic project I am working on that uses an Arduino Mega 2560.