Beginner quistion

Former Member
Former Member

Hi here Slight smile

Recently i bought myself /moving from other brand) an Fenix5 watch; really like the idea that programming/customizing is possible.

I figured out, as with all coding stuff the learning curve can be hard to crack, so i started reading stuff about the monkeyC language.

I have experience from other languages (mostly Linux, BASH, and a little python), not much C stuff, but i like to learn through!

I installed the eclipse env., and have a working workspace now.

Well, i find it hard to understand where and what to put inside the different files, and how to use the structure.

By this i mean stuff like ::

function initialize

function onLayou

function onShow

function onUpdate

etc... etc..

I tried putting some Println stuff inside, and i see how things are triggered when using watch on simulator, but i can't seem to get further, and therefore i ask for help here to get going.

What i would like to make, is an watchapp, which should be a simple Gym-Log. The app must do the following ::

At load/start, show my SPLASH image  (Yes i know! not pro., but just for a start now Slight smile)

Start the session, stop the session, where user is asked whether to save, resume etc.. just normal stuff here.

The layout should be 4 fields, 1. field "timer", 2. field "actual pulse", 3. field "temperature", 4. field "actual time"

If possible, user should not have possiblilty to change layout, actually i like user to have no possiblities to change anything (this app is intended for myself mainly)

When session is done, and user have saved session, i like the session (if possible) to be saved as "Strenght training"...

Anyone help me to get further from here ???

Rgds; Jesper

  • Former Member
    Former Member over 6 years ago in reply to jim_m_58

    Thanks alot again !

    I got this working, and it's spitting out some HR 129, 136 etc.. I will try to paste the values on the screen and transfer the app to my watch later.

    // HR START
    var hasHR = true;
    //hasHR is a boolen I set earlier to check if getHeartRateHistory is available on the device
    			var ret="N.A.";
    			var thisHR;
    			if(Activity.getActivityInfo().currentHeartRate!=null) {
    				thisHR=Activity.getActivityInfo().currentHeartRate;
    				ret=thisHR.toString();
    			} else if(hasHR) {
    				var hrh=ActMon.getHeartRateHistory(1,true);
    				ret="---";			
    				if(hrh!=null) {
    					var hrs=hrh.next();			
    					if(hrs!=null && hrs.heartRate!=null && hrs.heartRate!=ActMon.INVALID_HR_SAMPLE) {
    					thisHR=hrs.heartRate;
    					ret=thisHR.toString();
    					}
    				}
    			}
    System.println(ret);			
    // HR END			

    Jesper.