pb66 / homeeasyhacking

Automatically exported from code.google.com/p/homeeasyhacking
0 stars 0 forks source link

Library cannot receive using an Arduino Mega #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the library with an Arduino Mega (I have the 2560, but the schematic 
shows that the original version would have the same issue)

Transmission still works fine (although PINB5 is mapped to the Arduino pin 11 
instead of 13).

The Arduino Mega does not expose ICP1, and so Timer1 cannot be used for 
receiving.

As such, I have modified the library using (quite a few) more #defines... using 
a standard Arduino, there is no change required to the source as I am 
submitting it... using an Arduino Mega requires changing one #define.

The TX pin can still be changed, and using an Arduino Mega, the RX pin can also 
be selected (from a choice of 2).

I attach a patch and the source... instructions for configuring the #defines 
are in "HomeEasyDefines.h".

---

The only other change I made was to relax the timings for a simple protocol 
message... before doing so, my ByeByeStandby remotes (model BBSBRW) were rarely 
received successfully.

I believe this should not impact any other HomeEasy simple or advanced devices.

---

Thanks for the library! Nathan

Original issue reported on code.google.com by nbur...@gmail.com on 16 Mar 2011 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
Updated version... now there are no necessary changes to use the library on a 
standard or mega, this is detected (assuming the user has selected their board 
type).

On a standard, the default TX pin is B5 (pin 13) and RX is B0 (pin 8).
On a mega, the default TX pin is L6 (pin 43) and RX is L0 (pin 49).

Nathan

Original comment by nbur...@gmail.com on 17 Mar 2011 at 3:26

Attachments:

GoogleCodeExporter commented 9 years ago
The inclusion of a "keywords.txt" file tells the Arduino software about syntax 
to highlight...

Nathan

Original comment by nbur...@gmail.com on 20 Mar 2011 at 2:59

Attachments:

GoogleCodeExporter commented 9 years ago
Hi
Try to use your code but it doesnt work for me.
I've got an Mega 2560 and try to connect to 43/49 pins using arduino 1.0.1 :(
Any idea

Original comment by sgal...@gmail.com on 13 Jun 2012 at 7:01

GoogleCodeExporter commented 9 years ago
Hi,

I'm afraid there was a typo in that comment... it should be pin 48 for 
transmission, not 43!

As for receiving... currently that isn't working using Arduino 1.0+ - I'm 
looking into it, but not sure what they've changed that's broken it!  (A "fix" 
is to use Arduino-0023 until I can figure out what's wrong, since the original 
authors have clearly abandoned the library).

Regards,
Nathan

Original comment by nbur...@gmail.com on 13 Jun 2012 at 7:05