Yenya / ibus-altitude-sensor

I-Bus Altitude Sensor for FlySky Telemetry
GNU General Public License v2.0
28 stars 3 forks source link

Use an attiny85 or any board of choice via Arduino IDE #4

Closed svmdevelopment closed 4 years ago

svmdevelopment commented 4 years ago

Thank you for this nice project! I like to make an altitude sensor to use in cooperation with the FlyPlus firmware; I was just wondering if it might be possible to use an attiny85 instead of one of the Arduino clones you have used. It is probably just a minor change in the Makefile (like 1MHz and AVRDUDE settings) but that is just the part I am not familiar with, since I normally program the different boards/mcu's via the Arduino IDE and everything is configured in there. Do you have an idea if this is easy to do and how? Or might it maybe be an idea to add an .ino file to compile and upload the source via the Arduino IDE to any board or mcu of choice?

Thank you in advance!

Yenya commented 4 years ago

@svmdevelopment - sorry, this project is written in plain old C instead of Arduino/Wiring/C++. I do not plan to rewrite it into Arduino IDE/Wiring.

Also, ATtiny85 lacks hardware USART and SPI, and you would need both - the first one to communicate with the Rx, and the second one to communicate with the pressure sensor. In theory, it could be possible to use the USI part of ATtiny85 to do the I2C/SPI part, and to emulate the serial communication with the Rx by bit-banging another pin, but it would require a precise timing and so on. The code would have to be completely different.

With ATmega MCUs and hardware USART and SPI, the timing requirements are much lower.