Need to bootload multiple times when using Nick Gammons program - arduino

I have been facing this issue with Nick Gammon's Arduino boot loader that every time I bootload and write a program via Rx-Tx to an Atmega 2560 but if I want to re write another program the IDE shows an error and the whole process has to be repeated, is this normal behaviour?
Its sort of an issue as I am programming an LCD and need to make lots of small changes.
TIA.

Related

ESP32 CAM - EEPROM / sdcard / non erasable memory - beginner problem

Overwiew
I am working on my first project with ESP32, I have ESP32 CAM model and I am creating an automatic roller blinds. I got most of the project working - I have web server that controls continous servo and all mechanics. I want to be able to adjust the time for going up-down without reprograming the microcontroller. The goal is to have an automatic roller blinds with alarm clock function.
Problem
I need a way to reliable save/read data to store variables state, even without power. How to achive it with ESP32 CAM?
Additional info
On Arduino board that would be EEPROM, and I found some tutorials that claim that EEPROM can be used on ESP32. However, when I tried using EEPROM, it looks like the values are overwritten while bootloading. So I guess ESP32 CAM needs different approach. Correct me if I am wrong, please.
Ok, so user bvguy on Reddit solved my problem.
"EEPROM is deprecated. They want you to use preferences now. Here is an example ."
I tested the example and it works on my ESP32 CAM, therfore solving the problem.

Putting my raspberry pi program on a more primitive chip

I recently started coding on a raspberry pi. I build a circuit with three buttons, an LED and a 7 digit LCD. Its a fairly simply thing. You can set a time value with the + and - button in seconds and then press the other one to start a countdown. I use this to do triggered long exposures with my camera. However the raspberry pi is to big and bulky and needs to much energy.
Then I put my code and my circuit on an Arduino UNO which is an improvement in size and energy consumption.
Because my program is very simple I am sure that there must be a way to get this on a much smaller chip. I need some kind of programmable chip where I can put my code onto. Something that is small and dont has any other fancy features or more calculating power than I could need. As far as my knowledge goes I dont have any idea how to get into that.
At work we have a 3D printer with a W1209 temperature relay controller on it. This is a small circuit with the same 7 digit LCD pane and the temperature is also settable with two buttons. This inspired me to look for something much more primitive that would be enough for my needs.
Can you recommend any hardware or some tutorials about that?
Search the Microchip website for the DM164141 - MPLABXpress PIC16F18345 Evaluation Board. I think it's around $12 and should have enough I/O for your application. You can use the online MPLABXpress IDE for development.

Why do we need to select a board to work with arduino IDE

I always wondered how this works . In arduino IDE we have option to select different boards because the code upload i guess is different ? Also there is possibility to even add board manager url to add other boards.
Why uploading the code is so different from board to board , and what exactly differs there ? The code is sent to via serial connection and i understand that a board might have different chip for handling USB to serial but ..
Can someone explain as clear as possible , how the code is uploaded to a board and why there is no generic way , why so many configurations.
Thanks and sorry if is a dumb question.
One of the important things that selecting a board does is, as you say, inform the IDE of how to load code onto the board. Perhaps more importantly, the board definitions give you the logical mapping of the board's hardware to the code constructs you are using to program against. For example, have you ever wondered what happens when you use a constant like PIN_13, or how that constant maps to a physical pin on your board, which has a trace to some contact on the microcontroller chip itself?
There is a lot of other code you don't see, much of it in the board definitions (and some in the Arduino core) which lets you work with relatively direct concepts (like pin numbers and modes) in the code that you write or edit.

MSP430 I2C slave to generate PWM signal , master is R-pi3

I need to code for a MSP430FR5969 launch pad that can generate PWM signal upto 100KHz, I want to control it with R-Pi3 over the I2C bus to send the Freq and duty cycle to the MSP430.
I am very new in coding MSP430, any help would be appreciate it.
thans
I find the best approach is to look at the examples provided for this particular LaunchPad. You'll now find these under Resource Explorer.
Run the PWM example and get your head around what it's doing. This should be easy enough using the on-board LED.
Then run the I2C example and get your head round what that's doing. You can connect it straight to the Pi, but a logic analyser will really help with this.
Peripheral setup is the hardest part of MSP430 coding. Once you get this right (or just copy it from an example) the code in between is normally much easier.

Arduino SD card need Write only to reduce memory

I am using a Uno, GPS+SD card shield and LCD display and all runs fine with only 35% of memory used when not using the SD. When I add the SPI and SD Libraries for the SD card, combined they eat another 45% and I am getting a warning about reduced memory and the risk of unreliable performance. And, they are correct as sometimes writing to the SD doesn't work as expected.
The GPS/LCD work fine in their own Sketches. The SD/SPI work fine in their own Sketches. But when I combine the code I get the memory issues.
Since I only need to write to the SD card in CSV format, I am looking for a stripped down/SD/SPI combo that does only that as I can use a PC to read the data. I searched around and found a few possibles but they were all old and FAT16 only. I need to use FAT32 so I am currently stuck with SD/SPI.
I have ordered an Arduino Mega as it has 8M of memory so the problem should go away, but the original GPS is already set up in the dash of my truck and I would have to rebuild the brackets and project box for the Mega, so would like to just resolve the memory issue with the 4MB of the Uno. I am only going to use the Mega to make sure the full Sketch works OK and for 14-bucks, no big outlay for testing.
Can anyone help with a stripped down version of the SD/SPI combo as my code is tight enough until I add those Libraries.
Alternatively, you could get a stripped-down version of the GPS library. NeoGPS can be configured to be very small, both in terms of RAM and FLASH. It's also the fastest library out there. I wrote it because I had the same problem as you: combining multiple libraries in the smaller Arduinos revealed the bloat in all other GPS libraries: buffered copies of the sentences and data.

Resources