Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing unnecessary code from project #8

Open
stlinkgangs opened this issue Jul 15, 2023 · 4 comments
Open

Removing unnecessary code from project #8

stlinkgangs opened this issue Jul 15, 2023 · 4 comments

Comments

@stlinkgangs
Copy link

Hi, I am struggling a bit to strip down the code, remove the buttons and battery part. It uses too much RAM on my NRF chip so I would appreciate if you could help me :)

@dakhnod
Copy link
Owner

dakhnod commented Jul 15, 2023 via email

@stlinkgangs
Copy link
Author

I use an nrf51822 chip
I am also trying to make it as energy efficient as possible. Which is why I wanted to remove some of your LED, button and battery code, however I just cant seem to get it to compile without errors popping up.

@dakhnod
Copy link
Owner

dakhnod commented Jul 15, 2023

it works on an nRF51822 chip without any modifications. I ran it on qfaa and qfac.
You can just disable the led and button code via some #defines i believe.
Anyway, it should work as it is.

@stlinkgangs
Copy link
Author

stlinkgangs commented Jul 15, 2023

Yes, it works now, just git cloned it again.
However, I would still appreciate if you could tell me what parts of the makefile and main.c I can delete. I am no programmer :(

Edit: Nevermind, I figured it all out. Btw nice Idea to send the battery level as well. However, I could not figure out why you piped the 00b11… critically low battery state inside the keys. Is that just a placeholder for when the script replaces it with the actual state? Would it be possible to add more states to get more detailed battery info? Did you test out the maximum possible number of keys? For me it is 163, any more than that and I get an error for not enough RAM when compiling. How come that they take up so much RAM? Do you have any Idea if we could store them in the flash storage instead of the RAM? I do not really need more keys for my use case but I always like to test out the limits of whats possible. Anyway have a nice day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants