smar000 / evoGateway

Python script for listening in and responding to evohome heating control radio messages
47 stars 17 forks source link

FW & Makefile #2

Closed Ukhauk closed 5 years ago

Ukhauk commented 5 years ago

just wanted to thank the various authors for their contributions FW & Makefile all very interesting for me to burn the firmware to your nano install the following programs :- sudo apt-get install avrdude sudo apt-get install gcc-avr avr-libc then navigate to the downloaded FW folder and type make this creates the required HEX file the type sudo make program this uploads to your Nano all new to me hope someone finds the above steps useful

smar000 commented 5 years ago

Glad you got it sorted, and yes, that was the diagram I used when labelling the pins.

WRT uploading the firmware, yes, that is exactly how I do it, but I normally use a speed of 57600 (i.e. -b 57600) and not 115200 - I think there is a corresponding setting in the make file, which you would have to adjust if you wanted to write the firmware at a different speed. Note that this is only for the speed of uploading to the arduino, and not related to the speed that the arduino connects for the listener script.

Finally, if you are not getting any messages out of the arduino serial port, again make sure you have the correct speed on your tty terminal. This has to match the speed in the sha_nano_v3.h file.

On Sun, 23 Jun 2019 at 00:08, Ukhauk notifications@github.com wrote:

found a drawing and discovered that your correctly listing the PortPin's http://lab.dejaworks.com/wp-content/uploads/2016/08/Arduino-Nano-Pinout.png

I have installed avrdude gcc-avr avr-libc

Downloaded the code and make which uses the Makefile to generate the .hex file successfully

The file doesn't upload to the Arduino automatically so I am assuming you use AVRDUDE like this :-

avrdude -q -V -p atmega328p -D -c arduino -b 115200 -P /dev/ttyAMA0 -U flash:w:evo.hex:i

Don't appear to be getting any messages out of the Arduino via the serial port expected either the Transmit Receive LED to flash as messages came in and were relayed to the USB port any help appreciated

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/smar000/evohome-Listener/issues/2?email_source=notifications&email_token=AAGFWLDSXSN574QZYZGYUALP32WGTA5CNFSM4H2XFML2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKS6ZY#issuecomment-504704871, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGFWLB5SC3L3OPVVWSQZ2LP32WGTANCNFSM4H2XFMLQ .

Ukhauk commented 5 years ago

Its all working on a Nano massages coming in great thanks for your reply. Have you tried using the makefile for Arduino UNO ? I assumed I would # out

CDEFS += -DTARGET_SCC_V2

CDEFS += -DSHA_NANO_V3 and insert a new line CDEFS += -DARDUINO the hw/arduino.h would then be used

I can't see how changing BOARD parameter at the top changes how it compiles MCU = atmega328p BOARD =

Any help appreciated

smar000 commented 5 years ago

Sorry, I haven't tried with an Uno and so haven't looked into how the BOARD parameter relates to the compile process. From a quick 'grep', I don't see the BOARD parameter referenced anywhere other than the make file. As such, it may not be in use...