MySensors with Atmega8(L) ?
-
Hi guys,
I want to control two relays using MySensors and nRF24L01+. But I wanted to do that using a ATmega8(L), it has 8Kb of flash, instead a 32Kb from mega328 of arduino. Is that possible ?Thanks.
-
@joaopaulo
There has been some success using the ATtiny85 which also has 8kbytes flash. Search the forum for ATtiny.
-
you will probably need to hack&cut a library to reduce a required flash
I would recommend you to reconsider usage of atmega8, otherwise you will need to spend a lot of time to fit any upgrade
I had such an experience. I was translating Mysensors to Atmel Studio and that allows me to fit sensors & clocks into atmega8.
But as Mysensors is under fast development it became too complicated to follow.
-
@axillent Yeah, I was with this same intention to port MySensors to Atmel Studio and mega8. Anyway, I think it will be less complicated if i use the common mega328p as Arduino.
Thanks
-
// EDIT and ADD in: ...Arduino\libraries\MySensors\drivers\AVR\DigitalIO\DigitalPin.h
#if defined(__AVR_ATmega168__)\ ||defined(__AVR_ATmega168P__)\ ||defined(__AVR_ATmega8__)\ ||defined(__AVR_ATmega328P__) // 168 and 328 Arduinos
// EDIT and ADD IN: ...Arduino\libraries\MySensors\drivers\AVR\DigitalWriteFast\digitalWriteFast.h
#elif defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_DUEMILANOVE) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328PB__)
// ADD to Sketch Code:
//Name conversion R.Wiersma
#define UCSR0A UCSRA
#define UDR0 UDR
#define UDRE0 UDRE
#define RXC0 RXC
#define FE0 FE
#define TIFR1 TIFR
#define WDTCSR WDTCR#define WDIE 6
#define WDCE 4// DISABLE debug! small memory
//#define MY_DEBUGI did not test on HW, I just tried to compile it (DimmableLEDActuator):
-
@vikmad
Impressive, the same thing will work for an attiny84/85 ?
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Which device I have to use to connect with accelerometer before connecting to my pc?
General Discussion • 24 Jan 2023, 17:16 • Yada Kijsathan 17 days ago -
Why is the output of ACS712 current measurement module unchanged?
General Discussion • 19 Jul 2021, 09:09 • Tessie T 4 days ago -
Is it possible to extract child ID from a just sent message?
General Discussion • 8 Nov 2021, 09:21 • Nigel31 3 days ago -
ESP-NOW
General Discussion • 22 Apr 2018, 05:58 • NeverDie 17 Feb 2025, 22:24 -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 8 days ago