Homebrew FX Chrony display

I was trying the last update but in the board the only choices are the ones you coded.
The pellet I added to the code does not show up.
What have I done wrong?
Sorted?
Kind of figured that but never hurts to be sure.
I come from programming in C to C++ and using indentation to help follow coding.
You're thinking of Python. Indentation definitely helps to understand code
 
Solved... Sorry to have bothered you.
I re-downloaded the code and now it works... do not ask me why :mad:
But the joules displayed are wrong.
I've added:
{"HADES", "JSB", 15.89, 0.22, 1.03, 5.5},
{"JUMBO HEAVY", "JSB", 18.13, 0.22, 1.175, 5.5}
and this is the results. 71.37 joules, must be 7.1
may be the line 431 should say divide by 1000 and not 100?

03.jpg
 
  • Love
Reactions: Mendo2
Solved... Sorry to have bothered you.
I re-downloaded the code and now it works... do not ask me why :mad:
But the joules displayed are wrong.
I've added:
{"HADES", "JSB", 15.89, 0.22, 1.03, 5.5},
{"JUMBO HEAVY", "JSB", 18.13, 0.22, 1.175, 5.5}
and this is the results. 71.37 joules, must be 7.1
may be the line 431 should say divide by 1000 and not 100?
Y, sorry, I screwed that up. Repo updated. You are right, line 432

energy = 0.5 * (my_pellets[pellet_index].pellet_weight_grams / 100) * powf(fspeed, 2);

Should be

energy = 0.5 * (my_pellets[pellet_index].pellet_weight_grams / 1000) * powf(fspeed, 2);
 
I got my Arduino environment all set up. I have compiled and verified that all code samples given thus far will work. all looks good. now to decide on what display to use. I also 3d designed a replacement fx chrono battery door and now need to find a power pack that will stay on to run the chrony from a larger battery source. not sure if I used the proper tie in points on the chrony and that is what is causing my pack to shutoff. I used the power and ground pins on the side of the board. I see others have tied into the battery terminals for external power supply and that may be why.
 
  • Like
Reactions: DaystateRebel
I got my Arduino environment all set up. I have compiled and verified that all code samples given thus far will work. all looks good. now to decide on what display to use. I also 3d designed a replacement fx chrono battery door and now need to find a power pack that will stay on to run the chrony from a larger battery source. not sure if I used the proper tie in points on the chrony and that is what is causing my pack to shutoff. I used the power and ground pins on the side of the board. I see others have tied into the battery terminals for external power supply and that may be why.
How does it shut down? The battery terminals on the side of the PCB work. You have to supply 5V though and not 4.2V (lipo) because there is a voltage regulator. Also, the FX Chrono times out and shuts itself down after 3 mins if not connected.
 
How does it shut down? The battery terminals on the side of the PCB work. You have to supply 5V though and not 4.2V (lipo) because there is a voltage regulator. Also, the FX Chrono times out and shuts itself down after 3 mins if not connected.
I have an 8000 mah 29.6 wh charger pack. using usb-a 5v/2.4 amp port. I get a steady 5+ volts output at a full 100 percent charge. I power up the chrony no problems. hook to phone app on android. sits there a few minutes 2 or less then it shuts off. it seems the power pack isn't seeing enough current draw possibly and shuts itself off. power pack does have a button on the side to wake it up/ turn it on. if i hit button to try and turn chrony back on it takes 2 presses. first wakes up power pack second turns on chrony. may need a different pack. when batteries are reinstalled chrony acts as it should and stays on no issues.

DaystateRebel,
the last code update you posted will not compile. it breaks around line 174.

[G:\Documents\Arduino\Sketches\FXChrony\FXChrony.ino: In function 'void setup()':
G:\Documents\Arduino\Sketches\FXChrony\FXChrony.ino:177:35: error: expected primary-expression before ')' token
if(sensitivity > SENSITIVITY_MAX) {
^

exit status 1

Compilation error: expected primary-expression before ')' token]
this is my error code. compiling with heltech wifi kit 32 board
 
I have an 8000 mah 29.6 wh charger pack. using usb-a 5v/2.4 amp port. I get a steady 5+ volts output at a full 100 percent charge. I power up the chrony no problems. hook to phone app on android. sits there a few minutes 2 or less then it shuts off. it seems the power pack isn't seeing enough current draw possibly and shuts itself off. power pack does have a button on the side to wake it up/ turn it on. if i hit button to try and turn chrony back on it takes 2 presses. first wakes up power pack second turns on chrony. may need a different pack. when batteries are reinstalled chrony acts as it should and stays on no issues.
The FX Chrono does not fully power up until connected to the app. I think it draws about 10mA until then, which should still be enough. Maybe your suspicions are correct and that pack has some sort of a current draw sensing circuit. Did you try to connect it directly to the battery terminals, like you mentioned?
 
DaystateRebel,
the last code update you posted will not compile. it breaks around line 174.

[G:\Documents\Arduino\Sketches\FXChrony\FXChrony.ino: In function 'void setup()':
G:\Documents\Arduino\Sketches\FXChrony\FXChrony.ino:177:35: error: expected primary-expression before ')' token
if(sensitivity > SENSITIVITY_MAX) {
^

exit status 1

Compilation error: expected primary-expression before ')' token]
this is my error code. compiling with heltech wifi kit 32 board
<sigh> No idea how that snuck in, repo fixed. Line 77 should read

#define SENSITIVITY_MAX 100
 
  • Like
Reactions: Hallyster61
The FX Chrono does not fully power up until connected to the app. I think it draws about 10mA until then, which should still be enough. Maybe your suspicions are correct and that pack has some sort of a current draw sensing circuit. Did you try to connect it directly to the battery terminals, like you mentioned?
not yet but will give it a shot and see if it works.
 
I was trying to compile and got this error

Users\FXChrony\FXChrony.ino: In function 'void setup()':
Users\FXChrony\FXChrony.ino:210:3: error: 'u8g2' was not declared in this scope
u8g2.begin();
^~~~
Users\FXChrony\FXChrony.ino:210:3: note: suggested alternative: 'log2'
u8g2.begin();
^~~~
log2
Users\FXChrony\FXChrony.ino: In function 'void doRenderMenu()':
Users\FXChrony\FXChrony.ino:217:5: error: 'u8g2' was not declared in this scope
u8g2.clearBuffer(); // clear the internal memory
............................MORE u8g2 ERROR MESSAGES ......................
exit status 1

Compilation error: 'u8g2' was not declared in this scope
 
It's not currently supported, we can only work on hardware we have samples of. There's no guarantee when or if it will be supported
Then I guess I'll have to just muck along. ;)
I'm not a total Newbe at programming so this is a pretty new toy to play with.
It is open source so I guess I'll start down this trail and see where it leads.

You'd be amazed at some of the stuff I've programmed for.
 
I was trying to compile and got this error

Users\FXChrony\FXChrony.ino: In function 'void setup()':
Users\FXChrony\FXChrony.ino:210:3: error: 'u8g2' was not declared in this scope
u8g2.begin();
^~~~
Users\FXChrony\FXChrony.ino:210:3: note: suggested alternative: 'log2'
u8g2.begin();
^~~~
log2
Users\FXChrony\FXChrony.ino: In function 'void doRenderMenu()':
Users\FXChrony\FXChrony.ino:217:5: error: 'u8g2' was not declared in this scope
u8g2.clearBuffer(); // clear the internal memory
............................MORE u8g2 ERROR MESSAGES ......................
exit status 1

Compilation error: 'u8g2' was not declared in this scope
Install the libraries (Only do this the first time) Click Sketch | Include Library | Manage Libraries ... Use the "Filter your Search" to search for and install
1) u8g2
2) OneButton

1672167508071.png
1672167516620.png