Bangle2 need help with barometer app #5351
Replies: 1 comment
-
Posted at 2022-10-14 by @gfwilliams In the barometer app, as far as I can see you'd want to change MIN and MAX - maybe to -100 and +100: https://github.com/espruino/BangleApps/blob/master/apps/barometer/app.js#L6 Then instead of Posted at 2022-10-15 by sp I've set the Min and Max values but still I'm not getting the value to display.
Posted at 2022-10-17 by @gfwilliams It looks like you're doing Posted at 2022-10-19 by sp Still not getting it. Posted at 2022-10-19 by RaoulDuke This works for me, assuming "maxZ" is defined somewhere:
Posted at 2022-10-19 by sp Still no hand. Posted at 2022-10-19 by @gfwilliams Do you get any errors shown? We're trying to help, but if you just show us a section of your code, and just say 'doesn't work' whenever we try to help, we're not going to be able to do much for you. Posted at 2022-10-20 by sp Right, well I get the dial but no hand and no value, here's my code below;
Posted at 2022-10-20 by @thyttan @sp If you go to edit your last reply above, then highlight all your pasted code and lastly click the Posted at 2022-10-20 by sp many thanks @ganblejs Posted at 2022-10-20 by @gfwilliams Your code gave a whole bunch of errors on the console, like the
Posted at 2022-10-20 by sp Thanks guys. I noted on the AccelLog app there is a factor of 8192 used and here you have initialised maxZ = 10000. Posted at 2022-11-06 by sp on Bangle.JS2 how can I add a button with label RESET to reset the maxZ value? I tried this code from the counter app but it doesn't work. I've added it after line 80.
Posted at 2022-11-06 by @thyttan Here's the documentation for the setWatch-function. It seems to me that the code you pasted listens for a press of physical button BTN2 - which is only present on Bangle.js 1. If you change 'BTN2' to 'BTN1' I think it could work on Bangle.js 2 as well. Posted at 2022-11-07 by sp Tried BTN1, BTN both didn't work. Posted at 2022-11-07 by @thyttan
Do you see any messages in the console field in the web ide when you run the code? Have you defined the updateScreen()-function before this setWatch-block?
I think you might want to use the layout library to get that, not entierly sure. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-10-14 by sp
Hi Gordan,
I was looking for a way to display accel data in dial type display like in the Barometer app. Can you please just show me the code to display maxZ value instead of barometer value.
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions