Optiboot | Optimised bootloader for Arduino
kandi X-RAY | Optiboot Summary
kandi X-RAY | Optiboot Summary
Optiboot is an optimised bootloader for Arduino. It implements the STK500 upload protocol, so application code can be flashed over a serial port using Avrdude or the Arduino IDE. Optiboot is very small (512 bytes) and has lots of optimisations to speed up the flashing workflow including Erase-while-communicating, high baud rates (115200 baud) and prompt bootloader exits.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Optiboot
Optiboot Key Features
Optiboot Examples and Code Snippets
Community Discussions
Trending Discussions on Optiboot
QUESTION
I'm trying to build a small hygrometer based on the DHT11 and I'm having a bit of an "issue" with the code size. I want to run it on an Attiny45 and it's a wee bit too big (352 bytes too big to be exact). I am aware that I could just use an Attiny85 and have space to spare or don't use a bootloader and barely fit it in (94%) but I kind of want to make my life harder than it needs to be and figure out how to reduce size since it'll probably come in handy in the future. Treat it as a learning experience if you will.
What it's supposed to do:
- Read DHT11 input
- Display results on 2 two-digit 7-segment displays (so I guess 4 7-segments in total)
- Go to sleep most of the time to preserve battery
- Wake up every 8 seconds to update sensor values (without turning on the display)
- Wake up on a button press to display the values for humidity and temperature
Side note: 7-segments are adressed via two 74HC595s of which I am using 7 outputs each for the displays and 1 each for a transistor that connects the display in question to GND. There's a schematic at the bottom if you're interested.
As pointed out, my main issue is code size so if anyone has any tips on how to reduce that (or any other tips how to improve the code) please let me know.
I hope I'm asking the question properly, if not please let me know.
Compiler output:
...ANSWER
Answered 2021-Nov-09 at 12:55Okay so thanks to the input of Mat I tried substituting the DHT11 library with something more sleek, which took me a while to get up and running. I ended up using this as a base, edited around a bit and commented heavily for my benefit. I added my updated code below for anyone interested (thanks for pointing out the correct highlighting issue), there's also a github with the rest of the design files.
Seems the library is really heavy, as the compiler output shows:
Compiler output:
QUESTION
I'm working on a custom bootloader for OTA updates for my ATmega328p. I'm taking help from the Optiboot bootloader's code from Arduino and for the USART part, I have written a custom header file for handling USART comm. part. Here's is the code (check code basically to test the logic)-
bootuart.h
...ANSWER
Answered 2020-Oct-09 at 21:12After some replacements (not all of them) you'll get this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Optiboot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page