Start To Run http://starttorun.info downloads, reviews, schedules, info... Tue, 14 Aug 2018 13:29:27 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.8 Data Lover http://starttorun.info/data-lover/ http://starttorun.info/data-lover/#comments Tue, 24 Apr 2018 14:48:20 +0000 http://starttorun.info/?p=1518 A watch face featuring a readable time font, sun events, active statistics and YAHOO! weather. (features depend on watch capabilities, see Q5 in the Frequently Asked Questions below). Frequently asked questions Q1: There is no weather data downloaded / The location of the weather is not correct / … Getting weather to your watch requires ...read more

Dit bericht Data Lover komt van: Start To Run.

]]>
A watch face featuring a readable time font, sun events, active statistics and YAHOO! weather. (features depend on watch capabilities, see Q5 in the Frequently Asked Questions below).

click to enlarge picture

click to enlarge picture



Frequently asked questions

Q1: There is no weather data downloaded / The location of the weather is not correct / …
Getting weather to your watch requires 3 things to be right:

  • you need to be connected with your phone via bluetooth (go to Garmin Connect Mobile and synchronize your watch to force an active connection)
  • your phone needs to be connected with the internet (to be able to download weather info)
  • In the settings of the app set the default longitude/latitude to your home location (when possible the watchface will try to acquire the location of your last gps activity, but when you enter the coordinates of your home city in the settings then the watchface has a sensible backup option). To retrieve the location of your city go to the website https://www.latlong.net/ and enter your city.

Once you have entered the longitude/latitude of your city in the settings and the above 3 things are ok then you’ll need to wait until the next Internet request to happen for things to be corrected. This may take up to 2 hours!

(TIP: change the right chart option to Weather + Time Last Update to see when the last weather update was executed)

Q2: Why is the weather shown for Brussels and not for my location?
In the settings of the app set your own default longitude/latitude to your home location (To retrieve the location of your city go to the website https://www.latlong.net/ and enter your city). When possible the watchface will try to acquire the location of your last gps activity, but when failing to retrieve this it’ll use the coordinates of the longitude/latitude you’ve entered)


Q3: How often is the weather being refreshed?
A simple question with a not so straightforward answer as it’s dependant on several factors:

  • the fastest weather refresh rate is normally 2 hours, after filling in a donation key the fastest refresh rate becomes 15 minutes.
  • the refresh happens at regular intervals and at the moment the refresh happens there needs to be an active bluetooth connection, an active internet connection and a stored gps location (see Q1)
  • the data of the weather comes from the YAHOO! weather service, if the service address returns an invalid response (or times out) then the cached data stored in the watch face remains to be shown
  • the data of the weather comes from the YAHOO! weather service, this service also caches data and is also dependant on eg weather stations to provide data to YAHOO! So It could be that there is no new data and that the data just remains the same….

Q4: Can I verify whether the weather fetch was sucessful?
Yes, you can set the right chart option to Weather + Time of last update. When the weather fetch is succesful it will show the time of the latest fetch in the foreground color (white by default), when the weather fetch returned an error it will show in red (See Q1 on how to resolve. For additional debug info set up a debug session, see instructions at the bottom of this article.

Q5: The weather, the active heart rate chart and/or the option to show seconds is not available on my device

  • fetching the weather requires the ability to connect to the internet which is not possible on Connect IQ 1 devices
  • always on seconds and the active heart rate chart feature depend on the always on technology to provide updates to the screen while in low power mode (this is only supported in fenix 5 derivatives and vivoactive 3 derivatives)

Q6: The sunrise/sunset time is incorrect
The sunrise time is calculated once a day and is dependent on getting a good gps fix:

  • the gps location is only known for a very short period in watch faces (only shortly after doing a gps activity). To let the watchface acquire your location do the following: start a gps activity (eg run) and wait till you have acquired a good gps signal. stop the activity and go back to the watchface.

Q7: Can I force an update of the weather and or force an update of the sunrise/sunset times?
This doesn’t work on all watches, but it’ll work on most:

  • setup everything as explained in Q1 and/or Q5
  • uninstall the watch face (see Q8) (you will lose all your customizations by the uninstallation)
  • install the watch face

Q8: I try to install the watch face but the Connect IQ store tells me I need a firmware update while I’m already at the latest version!
Solution 1: Disconnect your watch from the usb cable, likely there’s an update on your watch ready to be installed. Install this update and retry.
Solution 2: Restore your watch to factory settings from within the System menu on your watch. (Be sure to upload your activities to Garmin Connect first as all user data will be wiped from the watch.)

Q9: I can not remove the watch face
To delete the Data Lover watch face you first have to make another face the active watch face.

Q10: Setting “x” is not applied properly
Sometimes when auto-updating a watch face the settings were updated to the new version but the program itself was not yet updated and was stuck on the previous version. To fix this remove the watch face (see Q9) and reinstall the watch face. (you will have to reapply your customization to the settings when removing and installing)

Q11: I have another question!
There are several channels for support:

  • You can post your question below this article
  • You can post your question in the forum support topic
  • You can use the contact developer link on the app description page

Download

The watchface can be downloaded from the Connect IQ Store

Donations

The watch face is fully functional without donating (there is a very occasional small message to encourage donations, refreshing the weather info occurs at a slightly higher rate after donation).



If you like the watch face you can show your appreciation by donating a small amount (suggested donation: 3 euro) on my PayPal account (Mention the name of the app: “Data Lover”). After donation you will receive a donation key on your PayPal email address which will remove the encouragement message from the watch face. (this email is a manual process, if you do not receive a donation key within 48 hours contact me via the contact developer link)

(SPECIAL PROMO: in case you like several of my apps and you want to remove donation encouragement messages from all of them, then donating one big amount might be beneficial to you. When you donate 19 euro or more you’ll get one key that’s valid for ALL my current AND future apps: https://www.paypal.me/PeterDeDecker/19eur )

Debugging setup (for advanced users)

The watch face contains a debug option, to set this up follow these steps:
1/ Uninstall the watch face (See Q9)
2/ Install the watch face and turn on the debug option in the settings
3/ Connect the watch with an usb cable to your computer and browse to the folder \GARMIN\APPS Remember the most recent name of the PRG file

4/ Browse to the folder \GARMIN\APPS\LOGS and create a txt file with the same name as the most recent prg file

5/ After running the watchface for a while the txt file should contain debug info about sun events and weather retrieval

Dit bericht Data Lover komt van: Start To Run.

]]>
http://starttorun.info/data-lover/feed/ 39
Connect IQ Fonts http://starttorun.info/connect-iq-fonts/ http://starttorun.info/connect-iq-fonts/#respond Thu, 29 Mar 2018 15:00:20 +0000 http://starttorun.info/?p=1389 Overview This page will show you a collection of fonts which can be used for your Garmin IQ projects. Feel free to share your own creations helping to make this a valuable font library for all coders. A font set should include a bitmap (png) and a font description file (fnt) for each type style ...read more

Dit bericht Connect IQ Fonts komt van: Start To Run.

]]>
Overview

This page will show you a collection of fonts which can be used for your Garmin IQ projects. Feel free to share your own creations helping to make this a valuable font library for all coders.
A font set should include a bitmap (png) and a font description file (fnt) for each type style (font size, font weight etc.), additionaly the original base of the created font (ttf, otf etc.) could also be added.

The following font sections are available:

  • Standard fonts fonts for normal text including at least the characters a-z, A-Z, 0-9
  • Special characters reduced character set for special purposes (e.g. numbers only)
  • Symbols individual character set for special purposes (e.g. activity symbols, icons)

Standard fonts

Tiny Font
Original Forerunner 935 Font. DOWNLOAD

XTiny Font
Original Forerunner 935 Font. DOWNLOAD

Cool Font
This font is slightly larger than the original tiny fonts of the Forerunner 935 without being wider, so it is more readable but does not need much more space. Compared to the standard fonts the CoolFont’s characters have a more rounder shape. DOWNLOAD

Special characters

No font available for now…


Symbols

No font available for now…


Publish your Connect IQ font

If you like to share your font to support other coders just send an email to ConnectIQFont@gmail.com.
Please send only fonts which have been done by you and keep in mind to respect copyrights when adding vector fonts into the zip archive.
Thank you!

Dit bericht Connect IQ Fonts komt van: Start To Run.

]]>
http://starttorun.info/connect-iq-fonts/feed/ 0
Guest post 0: tackling Connect IQ versions, screen shapes and memory limitations (the resource override version) http://starttorun.info/guestpost-0-tackling-connect-iq-versions-screen-shapes-and-memory-limitations-the-resource-override-version/ http://starttorun.info/guestpost-0-tackling-connect-iq-versions-screen-shapes-and-memory-limitations-the-resource-override-version/#comments Mon, 05 Feb 2018 22:17:56 +0000 http://starttorun.info/?p=1419 Last year I made a first version of the article that now appeared on the Garmin developer blog, jungles did not exist yet back then, so I was using resource overrides to solve the same problem. Nowadays I’d advise you to go for the jungle approach as it provides greater flexibility, yet this version of ...read more

Dit bericht Guest post 0: tackling Connect IQ versions, screen shapes and memory limitations (the resource override version) komt van: Start To Run.

]]>
Last year I made a first version of the article that now appeared on the Garmin developer blog, jungles did not exist yet back then, so I was using resource overrides to solve the same problem. Nowadays I’d advise you to go for the jungle approach as it provides greater flexibility, yet this version of this article might still be useful to as it shows how to use resource overrides in Monkey C code. When you read the guest post that was posted on the Garmin developer blog, you should notice many similarities, both versions of the code are available from my github account🙂



Garmin devices come in different shape and sizes, have different memory constraints, and have different levels of Connect IQ compatibility. To be able to maintain different Connect IQ devices you can use the has functionality to test whether a certain feature is present on the device, but applying this technique too much makes the code unmanageable. You could also set up a Connect IQ project per device and copy/paste your code across your projects, but this is very labor intensive to keep your code in sync and is prone to mistakes.



Using one code base to handle all Garmin devices compatible with Connect IQ is easier than you think. All you have to do is combine three core features of the Connect IQ framework: inheritance, resource overrides, and file excludes. Let’s see how these features help you to solve the issues that held us back.



Screen Geometry




One way to solve different size/shape issues is to use the layout system. This works perfect for watch faces as you have a lot of memory available there. In data fields, the memory budget is usually tight and as the layout system has a higher memory requirement, I got used to opting for using direct drawing on the dc object instead. I want to have the same benefits as the layout system though, as I might want a different layout on each device.



So how do we do this?


  • Define a base class CommonLogicView where we handle all logic that we have to do on each device.
  • Define a class called DeviceView for each device that we want to support. This DeviceView inherits from the CommonLogicViewand implements the layout specifics for each device by drawing to the dc
  • For each device create a build resource exclude where you exclude all other device class implementations.
    Let’s say that you’re trying to build for the original vivoactive and the Forerunner 735XT. These two products have different screen geometry and support different versions of Connect IQ. The picture below shows how the project will look like after this has been set up:

  • Folder structure

    The resources/fr735xt file excludes are defined in sources.xml. We simply specify which code files we do NOT want in the build for this device. We apply a similar tactic for each device we implement:


    
        
    



    The CommonLogicView is the base view. Here we handle all code that we can use in all the device implementations. It’s a pretty easy class, the main entry point into this class is the onUpdate function:


    class CommonLogicView extends Ui.WatchFace {
        ...
    
        // this is called whenever the screen needs to be updated
        function onUpdate(dc) {
            // Common update of the screen: Clear the screen with the backgroundcolor.
            clearScreen(dc);
            
            // We can also do common calculations here, in this case we'll just get the current time
            determineClockTime();
        }
        
        // clears the screen and stores the width & height in global variables
        function clearScreen(dc) {
            ...
        }
        
        function determineClockTime() {
            ...
        }
    }



    The DeviceView is where we implement the specifics of the device, so for the Forerunner 735XT we could have something like this:


    class DeviceView extends CommonLogicView {  // inherits from CommonLogic
        function initialize() {
            CommonLogicView.initialize();  // important to call the initialize of your base class, even when you have nothing to add…
        }
    
        function onUpdate(dc) {
            CommonLogicView.onUpdate(dc);
            
            dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
            dc.drawText(width / 2, height / 2, Gfx.FONT_NUMBER_THAI_HOT, timeString, Gfx.TEXT_JUSTIFY_CENTER | Gfx.TEXT_JUSTIFY_VCENTER);
    
            dc.setColor(Gfx.COLOR_BLUE, Gfx.COLOR_TRANSPARENT);
            dc.drawText(width / 2, 140, Gfx.FONT_SMALL, "I'm Peter's favourite!", Gfx.TEXT_JUSTIFY_CENTER);
        }
    }



    For the vivoactive we have a similar file, but then implementing the specifics of the vivoactive:


    class DeviceView extends CommonLogicView {
        function initialize() {
            CommonLogicView.initialize();  // important to call the initialize of your base class, even when you have nothing to add…
        }
    
        function onUpdate(dc) {
            // call the parent function in order to execute the logic of the parent
            CommonLogicView.onUpdate(dc);
            
            dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_TRANSPARENT);
            dc.drawText(width / 2, height / 2, Gfx.FONT_NUMBER_THAI_HOT, timeString, Gfx.TEXT_JUSTIFY_CENTER | Gfx.TEXT_JUSTIFY_VCENTER);
    
            dc.setColor(Gfx.COLOR_PINK, Gfx.COLOR_TRANSPARENT);
            dc.drawText(width / 2, 110, Gfx.FONT_MEDIUM, "I'm a cool watch!", Gfx.TEXT_JUSTIFY_CENTER);
        }
    }



    When we run the code this results in the following in the simulator:



    simulator view




    Full Source Code



    Memory Constraints


    The Forerunner 235 and Forerunner 735XT are both semi-round, but they have different memory limitations. For instance, in data field mode, the FR235 allows for 16K of memory, while the FR735XT has 26K of available memory to play with. That means we can pack 10K more goodies in the 735XT data field!


    To do this we apply the same technique of combining inheritance, resource overrides and file excludes, just adding one layer of extra inheritance does the trick:



    adding a memory layer




    In my Peter’s (Race) Pacer app I’m taking this technique to the extreme and have 4 layers of inheritance defined: CommonLogic, LayoutLowMemory, CommonHighMemoryLogic, and LayoutHighMemory.



    All layers inherit from each other so that I don’t have to write a single letter of duplicate code. This allows me to support all combinations of Connect IQ 1.x and 2.x devices from a single code base, while getting the max out of the available memory for each device!



    2 Layouts




    Connect IQ Version Compatibility


    We are treated with more and more features being added to the Connect IQ framework. Older devices can not be upgraded to Connect IQ 2 because they don’t have enough processing power and/or memory available. Luckily we can apply the same technique of combining inheritance and file excludes to be able to use new Connect IQ 2 features in our projects while simultaneously also retaining support for users that have Connect IQ 1 devices. Cool, eh?



    Let’s demonstrate this with a sample project. I’m going to extend the watch face with the ability to pull “to do” lists from a web-service via a background process, while at the same time we continue to support Connect IQ 1 devices. Of course the functionality on the Connect IQ devices will remain the same as before the changes as there is no alternative to background services in Connect IQ 1.x.



    We open our project from before and add the Connect IQ abstraction layer, this is the one I’ve defined for Connect IQ 1:



    class CiqView extends CommonLogicView {
        hidden var message; // I could add this variable to the CommonLogicView class, this is to show that you can define class instance variables at any level in the inheritance tree…
    
        function initialize() {
            CommonLogicView.initialize();
            message = "I'm a CIQ1 device!";
        }
    }

    A very similar class we add for the Connect IQ 2 devices, looks quite similar, only difference being that we’ll pick up the message from the application class:



    class CiqView extends CommonLogicView {
        hidden var message;  
    
        function initialize() {
            CommonLogicView.initialize();
        }
    
        function onUpdate(dc) {
            CommonLogicView.onUpdate(dc);
            message = App.getApp().backgroundMessage;
        }
    }

    In addition we change the DeviceView to show the message variable and in the resource file excludes exclude either the Ciq1View.mc or Ciq2View.mc.



    We’ve also duplicated the application layer level. The Connect IQ 1 version is pretty straightforward (you can have a peek at the source on github). The Connect IQ 2 version is slightly more complex as we’ll implement a background service to fetch from a webservice here (trimmed for readability):



    (:background)
    class PetersWatchfaceApp extends App.AppBase {
        var backgroundMessage = "What should I do?";
    
        function initialize() {
            AppBase.initialize();
        }
    
        function getInitialView() {
            // register for temporal events, we don't need to check whether this is supported, we know we have a Connect IQ 2 device here!
            Background.registerForTemporalEvent(new Time.Duration(5 * 60));                
            return [ new DeviceView() ];  
        }
        
        function onBackgroundData(data) {
            // store the data from the background event in a class level variable
            backgroundMessage = data;
            
            // we received a new todo item, invoke a request to update the screen
            Ui.requestUpdate();
        }
    
        function getServiceDelegate(){
            return [new BackgroundServiceDelegate()];
        }
    }



    The service delegate is the main entry point for the background service, inside we’ll fetch a random to do item from the web-service.



    (:background)
    class BackgroundServiceDelegate extends System.ServiceDelegate {
        function initialize() {
            System.ServiceDelegate.initialize();
        }
        
        // this is called every time the periodic event is triggered by the system.
        function onTemporalEvent() {
            Comm.makeWebRequest(
                "https://jsonplaceholder.typicode.com/todos/" + (Math.rand() % 100 + 1),  // get a random number between 1 and 100
                {},
                { "Content-Type" => Comm.REQUEST_CONTENT_TYPE_URL_ENCODED },
                method(:onReceive)
            );    
        }
        
        // receive the data from the web request
        function onReceive(responseCode, data) {
            if (responseCode == 200) {
                Background.exit(data["title"]); // get the title part of the todo list…
            } else {
                Background.exit("Error " + responseCode);
            }
        }    
    }



    Full source code



    Hope you’ll like this technique!

    Happy coding!

    Dit bericht Guest post 0: tackling Connect IQ versions, screen shapes and memory limitations (the resource override version) komt van: Start To Run.

    ]]> http://starttorun.info/guestpost-0-tackling-connect-iq-versions-screen-shapes-and-memory-limitations-the-resource-override-version/feed/ 3 Connect IQ Tools for developers http://starttorun.info/connect-iq-tools-for-developers/ http://starttorun.info/connect-iq-tools-for-developers/#respond Sun, 21 Jan 2018 08:24:47 +0000 http://starttorun.info/?p=1469 Several 3rd party developers have developed tools to make your Connect IQ development easier. This page provides an overview of these tools. Name Description Bird’s IQ (Puffolino) the program checks a source text to analyze how variables and constants are used. This could be helpful for tuning a program (to use more local and class ...read more

    Dit bericht Connect IQ Tools for developers komt van: Start To Run.

    ]]>
    Several 3rd party developers have developed tools to make your Connect IQ development easier. This page provides an overview of these tools.

    .

    Name Description
    Bird’s IQ

    (Puffolino)
    the program checks a source text to analyze how variables and constants are used. This could be helpful for tuning a program (to use more local and class variables and less globals) or finding unused variables etc

    Download
    Foxrunner

    (Puffolino)
    this tool for the systray checks if you have connected your forerunner or fenix watch to the USB port – if so, it will automatically copy new activities to a specified directory

    Download
    Monkey Code Keeper

    (TomasSlavicek)
    This tool checks the sanity of your code (unused variables, functions, etc…)

    Download
    Screeny

    (Puffolino)
    when screenshots are done, you often see unwanted borders (watch bezel in the simulator or black background) – this is a tool which allows to create colorful or transparent backgrounds and also allows to make a colored circle around the watch display. The program has been optimized for 240×240 displays.

    Download

    Dit bericht Connect IQ Tools for developers komt van: Start To Run.

    ]]>
    http://starttorun.info/connect-iq-tools-for-developers/feed/ 0
    Fat Burner http://starttorun.info/fat-burner/ http://starttorun.info/fat-burner/#respond Sun, 07 Jan 2018 11:11:28 +0000 http://starttorun.info/?p=1462 Summary Simple datafield to accomodate a request by Susun. This field calculates the fat calories burned depending on heart rate zone & calories. The following defaults are configured: Z1: 9kcal burned = 1 gram of fat burned Z2: 80% fat Z3: 50% fat Z4: 20% fat Z5: 0% fat In the settings you can: opt ...read more

    Dit bericht Fat Burner komt van: Start To Run.

    ]]>
    Summary

    Simple datafield to accomodate a request by Susun.



    This field calculates the fat calories burned depending on heart rate zone & calories. The following defaults are configured:

    • Z1: 9kcal burned = 1 gram of fat burned
    • Z2: 80% fat
    • Z3: 50% fat
    • Z4: 20% fat
    • Z5: 0% fat





    In the settings you can:

    • opt to see Fat Burner (=default) / Carbs Burner / Fat Burner and Carbs Burner
    • finetune the percentages for each zone





    (Advice : do to consume too much carbs per hour, the absolute maximum is 70g/hour)



    Installation

    • Install the Data Field on your watch by clicking download in the Connect IQ store
    • Configure your watch to use the data field:
      • Choose the Activity Profile for which you wish to install this data field for (eg Running)
      • Choose Activity Settings
      • Choose Data Screens
      • Choose “Screen 1” (or another screen)
      • Choose field 1 (or any of the other fields)
      • Choose “Connect IQ”
      • Select “Fat Burner” from the list

    The sequence on how to do the above things is a little bit different on each watch (you can find the buttons to press in the user manual of your device in the section “Customizing the data screens)”


    Configuration

    You can configure how the app behaves in the application settings (via Garmin Express or Garmin Connect Mobile)




    Support / Questions / Feature Requests

    When you have questions preferably post this question in the forum support topic (you have to log in first with your garmin user name in the top right corner before you can make a reply to this post)

    Dit bericht Fat Burner komt van: Start To Run.

    ]]>
    http://starttorun.info/fat-burner/feed/ 0
    Tutorial: Define Application Properties http://starttorun.info/tutorial-define-application-properties/ http://starttorun.info/tutorial-define-application-properties/#respond Fri, 29 Sep 2017 17:06:49 +0000 http://starttorun.info/?p=1374 In the previous tutorials we learned how to do unit testing. We’re going to use that project as a starting base to add application properties on top, so you can use your project you made so far or download my project from github as a starting version. Application properties: Why? Application properties allow you to ...read more

    Dit bericht Tutorial: Define Application Properties komt van: Start To Run.

    ]]>
    In the previous tutorials we learned how to do unit testing. We’re going to use that project as a starting base to add application properties on top, so you can use your project you made so far or download my project from github as a starting version.
    .

    Application properties: Why?


    Application properties allow you to make your project configurable by the user. The user enters the values for the parameters you have defined and in our connect iq program we work with what the user has provided us.

    Defining the properties

    The properties are defined within the resources folder, you can give it any name and store it anywhere in the resources folder structure, but I like to call that file properties.xml and store it in a folder called settings for clarity.

    
        
        	5
        	true
        	true
        	true
        	true
        
    
        
            
                
    		
            
                
    		
            
                
    		
            
                
    		
            
                
    		
        
    

    We also have to define a new set of string resources for the titles, you can store this within the properties.xml or within the strings.xml file you already have. In this case I’ve added it to the strings.xml file (mainly because I added multiple language support to this project)

    This is what it looks like:

    
        Steps Carousel
        Total
        Steps
        To Go
        Goal (%)    
        Show next item in carousel every X seconds
        Show Total Steps (today's steps)
    	Show Steps of the current activity
    	Show Steps left to reach goal steps of the day
    	Show Goal Reached Today in Percent
    

    Get the settings


    Retrieving the settings is pretty straightforward via Application.getApp().getProperty(…).

    function initialize() {
            DataField.initialize();
    		
            fields = 0;
            var app = Application.getApp();
            carouselSeconds = app.getProperty("carouselSeconds") == null? 5 : app.getProperty("carouselSeconds");
            if (app.getProperty("showTotal") == null? true : app.getProperty("showTotal")) {
                field[fields] = 1;
                fields++;
            }
            if ((app.getProperty("showSteps") == null? true : app.getProperty("showSteps")) || fields == 0) {
                field[fields] = 2;
                fields++;
            }
            if (app.getProperty("showStepsToGo") == null? true : app.getProperty("showStepsToGo")) {
                field[fields] = 3;
                fields++;
            }
            if (app.getProperty("showGoalPercentage") == null? true : app.getProperty("showGoalPercentage")) {
                field[fields] = 4;
                fields++;
            }
        }

    This will retrieve the application properties at initialization time. When you wish to let the user change the settings while the application is running then you also need to implement the onSettingsChanged() function.

    All we have to do now is do something with the settings that we read and use them in the compute function.

    function compute(info) {
            var activityMonitorInfo = getActivityMonitorInfo();
            if (timerRunning) {
                stepsRecorded = activityMonitorInfo.steps - stepsNonActive;
                 ticker++;
            }
    
            var timerSlot = (ticker % (fields * carouselSeconds));  // modulo the number of fields * number of seconds to show the field 
    
            if (timerSlot <= carouselSeconds-1) {  // first slot?
    			showField(field[0]);
            } else if (timerSlot <= carouselSeconds*2-1) {
    			showField(field[1]);
            } else if (timerSlot <= carouselSeconds*3-1) {
    			showField(field[2]);
            } else if (timerSlot <= carouselSeconds*4-1) {
    			showField(field[3]);
            } else {
                value = 0;
            }
        }
    	
        function showField (fieldNr) {
            var activityMonitorInfo = getActivityMonitorInfo();
            if (fieldNr == 1) {
                labelResource = Rez.Strings.TotalSteps;
                value = activityMonitorInfo.steps;
            } else if (fieldNr == 2) {
                labelResource = Rez.Strings.ActiveSteps;
                value = stepsRecorded;
            } else if (fieldNr == 3) {
                value = (activityMonitorInfo.stepGoal - activityMonitorInfo.steps);
                if (value < 0) {
                    value = -1 * value;
                    var timerSlot = (ticker % carouselSeconds);
                    if (timerSlot <= carouselSeconds / 2) {
                        labelResource = Rez.Strings.GoalReached;
                    } else {
                        labelResource = Rez.Strings.Congrats;
                    }
                } else {
                    labelResource = Rez.Strings.StepsToDo;
                }
            } else if (fieldNr == 4) {
                labelResource = Rez.Strings.GoalPercentage;
                value = (activityMonitorInfo.steps * 100.0) / activityMonitorInfo.stepGoal;
                valueFormat = "%.2f";
            }
        }

    You can download the full source code from github

    That’s all…


    … or is it?


    Well if we run the unit tests we get an error….

    Executing test initialStepsTotalIsZero...
    Failed invoking Unexpected Type Error
      in initialize (C:\_Personal\git\connectiq-public\tutorials\tutorial-07\Tutorial-07-StepsCarousel\source\StepsCarouselView.mc:21)
      in initialize (C:\_Personal\git\connectiq-public\tutorials\tutorial-07\Tutorial-07-StepsCarouselTests\source\StepsCarouselMocks.mc:5)
      in initialStepsTotalIsZero (C:\_Personal\git\connectiq-public\tutorials\tutorial-07\Tutorial-07-StepsCarouselTests\source\StepsCarouselTests.mc:9)
      in runTest (UnitTests:40)
    ERROR

    That’s not good! We’ll see in the next tutorial how to fix this!

    Dit bericht Tutorial: Define Application Properties komt van: Start To Run.

    ]]>
    http://starttorun.info/tutorial-define-application-properties/feed/ 0
    Calculated Field http://starttorun.info/calculated-field/ http://starttorun.info/calculated-field/#respond Wed, 02 Aug 2017 15:11:09 +0000 http://starttorun.info/?p=1330 What? The Calculated Field Connect IQ Data Field allows you to come up with your own simple calculation. Supported operations: + – * / ^ (power) Following variables are available: heartrate, cadence, power, altitude, averagecadence, averageheartrate, averagepower, averagespeed, calories, heading, locationaccuracy, speed, distance, elapsedtime, energyexpenditure, timerTime, totalascent, totaldescent, trainingeffect, maxcadence, maxheartrate, maxpower, maxspeed Download Download ...read more

    Dit bericht Calculated Field komt van: Start To Run.

    ]]>
    What?

    The Calculated Field Connect IQ Data Field allows you to come up with your own simple calculation.

    Supported operations:

    • +
    • *
    • /
    • ^ (power)

    Following variables are available:

    heartrate, cadence, power, altitude, averagecadence, averageheartrate, averagepower, averagespeed, calories, heading, locationaccuracy, speed, distance, elapsedtime, energyexpenditure, timerTime, totalascent, totaldescent, trainingeffect, maxcadence, maxheartrate, maxpower, maxspeed

    Download

    Download the data field from the connect iq store

    Dit bericht Calculated Field komt van: Start To Run.

    ]]>
    http://starttorun.info/calculated-field/feed/ 0
    Connect IQ Apps with Source Code http://starttorun.info/connect-iq-apps-with-source-code/ http://starttorun.info/connect-iq-apps-with-source-code/#comments Fri, 31 Mar 2017 06:06:23 +0000 http://starttorun.info/?p=1149 The Connect IQ SDK itself contains a good set of examples (you find these in the samples directory when you download the latest sdk package). Connect IQ Tutorials (Learn Best Practices) If you want to learn to create Connect IQ programs then I would advise you to have a look at the available tutorials. Examples ...read more

    Dit bericht Connect IQ Apps with Source Code komt van: Start To Run.

    ]]>
    .
    The Connect IQ SDK itself contains a good set of examples (you find these in the samples directory when you download the latest sdk package).

    Connect IQ Tutorials (Learn Best Practices)


    If you want to learn to create Connect IQ programs then I would advise you to have a look at the available tutorials. Examples an sich are good, but tutorials in addition also explain best practices and the why (in addition to the how).

    Tutorials by Peter (Me):
    Tutorial Overview

    Tutorials by Jim (jim_m_58):

    Tutorials by Hermo (HermoT):

    Tutorials by Franco Trimboli:

    Download Connect IQ Source Code (Learn By Example)


    .

    There are a lot of Garmin Connect IQ developers that share their Monkey C source code with the world. This section is a collection of links towards these source code repositories. The quality of the code varies a lot from one repo to another: some are prime examples of how to code, others are not…

    (When you use something in your own apps be sure to give credit where credit is due and to respect the license of the open source app (usually available in the root of the source code repo))

    Apps:
    2048-ish

    2048
    8min Abs
    7-Minute Workout
    Badminton
    Flashlight
    Fitness Timer
    Glider SK
    gImporter
    Helicopter
    HueCiq
    Kraken
    LandNav App

    Low Battery Mode

    Mark Laying

    Meditate

    Orange Theory

    Nest Thermostat
    Sailing
    Sailing Timer
    Sendpoints
    Sleep As Android Garmin Addon
    Snapshot Resting Heart Rate
    SportMonitor App
    SensorViz
    Stretch
    Squash App
    Tabata Timer
    Triathlon, Duathlon & Aquathlon
    Ultitimer

    Data Fields:
    Auxiliary Heartrate
    Average pace with trend indication
    Calculated Field + Tests
    Back To Home
    Average Vertical Speed
    Big Number Field
    Bikers Field
    Chart Data Fields
    Cog Display
    Colour Heartrate
    Cyclist Datafield
    Display GPS
    Dozen Run
    Current speed in percent of vVo2max
    Energy Expenditure Field
    Estimated Pool Distance
    FlexiRunner
    Heart Rate Runner
    HMFields
    Laps
    Monkey Fuel
    My Training Impact
    My Training Intensity
    ORun
    Power Adjuster
    PowerField + Tests
    Runners Field
    Running Economy Field
    Snapshot

    Snapshot Heartrate
    Speed Gauge
    Steps Carousel
    Tempo Trainer
    Tidy Field
    Time To Rest
    Trendy Run
    Turn Around Reminder
    View Distance In 500 Metre Segments
    View Time In 15 Minute Segments
    W’ Balance


    Other:
    Samples collection
    Wraptext class

    Watch Faces:
    AMD Watchface
    Analog 24 hour
    Analog Battery Saver
    Analog Plus
    Arc Sin
    Aviator Like
    Binary Elegance

    Binary Elegance HR
    Binary Time
    Binary System
    Chief Dexter
    Clean Steps
    Crystal
    Daily Stats With Time Watchface
    Dark Times
    DayRound
    Digital
    Divided Time
    Dotter
    DrawLineAA
    Felt
    Flip Clock
    Formula 1
    Full Day
    Garmin Flags
    Garmin Mario
    Garmin Van Gogh
    Helsingborg Marathon
    JSClock
    KISSFace
    Mickey

    Lefthand watchface
    Malmö FF
    Military24Time
    MotorcycleFBSide
    My Big Date
    Nyan Cat
    Oz
    PolyBug
    SimpleWaF
    Simplog
    Simply Late
    Sixtop.net watchface
    Snapshot Watch
    StyloMylo
    Swaggin’ Numerals
    Tidy Watch
    Waketest


    Widgets:
    Activity Overview
    Activity Widget
    #CIQSummit17
    Compass Widget
    Crypto Currencies
    Emergency Info
    Football Fixtures
    Forecastline
    Fortune Quote

    HassIq
    Hr Widget
    Instrument Panel
    Iq Meteo
    Moon Phase
    Nest Camera Control
    Show All Infos
    Sms
    Simple Va3 Battery
    Sun Calc
    Timer Widget
    Train As One
    Word Of The Day
    ZuluTime

    Android Companion Apps:
    gExporter
    Sleep As Android

    Did you spot another source code repository that’s not in the list yet?
    Let us know in the comments below and we’ll add it to the list.

    Dit bericht Connect IQ Apps with Source Code komt van: Start To Run.

    ]]>
    http://starttorun.info/connect-iq-apps-with-source-code/feed/ 6
    Eat! Drink! Reminder! (Data Field) http://starttorun.info/eat-drink-reminder-data-field/ http://starttorun.info/eat-drink-reminder-data-field/#comments Thu, 09 Feb 2017 16:02:02 +0000 http://starttorun.info/?p=1121 Summary The Eat! Drink! Reminder! Data Field is a Garmin Connect IQ application which helps you to remember to drink and eat while you are doing your endurance training (long run, long ride, etc…) Installation Install the Data Field on your watch by clicking download in the Connect IQ store Configure your watch to use ...read more

    Dit bericht Eat! Drink! Reminder! (Data Field) komt van: Start To Run.

    ]]>
    Summary

    The Eat! Drink! Reminder! Data Field is a Garmin Connect IQ application which helps you to remember to drink and eat while you are doing your endurance training (long run, long ride, etc…)


    Installation

    • Install the Data Field on your watch by clicking download in the Connect IQ store
    • Configure your watch to use the data field:
      • Choose the Activity Profile for which you wish to install this data field for (eg Running)
      • Choose Activity Settings
      • Choose Data Screens
      • Choose “Screen 1” (or another screen)
      • Choose field 1 (or any of the other fields)
      • Choose “Connect IQ”
      • Select “Eat! Drink Reminder!” from the list

    The sequence on how to do the above things is a little bit different on each watch (you can find the buttons to press in the user manual of your device in the section “Customizing the data screens)”


    Configuration

    You can configure how the app behaves in the application settings (via Garmin Express or Garmin Connect Mobile)




    Translate in your language

    Translate this file and send the translated version + language name back via the contact developer link, I’ll include the translation then in the next release.

    Donations


    The data field is fully functional without donating. Donations are optional but encouraged from within the data field with a small encouragement text. If you find the Eat! Drink! Reminder! useful you can show your appreciation by donating an amount (suggested donation: 3 euro) on my PayPal account: https://www.paypal.me/PeterDeDecker/3eur (mention the name of the app “Eat! Drink! Reminder!”)

    After donation you will receive a donation key on your paypal email address which will remove the encouragement message from the data field. (this is a manual process, but normally you should receive a key within 24 hours)
    (special promo – donate 15 euro or more and get a key that’s valid for all my current and future apps: https://www.paypal.me/PeterDeDecker/15eur )

    Support / Questions / Feature Requests

    When you have questions preferably post this question in the forum support topic (you have to log in first with your garmin user name in the top right corner before you can make a reply to this post)

    Dit bericht Eat! Drink! Reminder! (Data Field) komt van: Start To Run.

    ]]>
    http://starttorun.info/eat-drink-reminder-data-field/feed/ 4
    Steps Carousel Data Field http://starttorun.info/steps-carousel-data-field/ http://starttorun.info/steps-carousel-data-field/#respond Thu, 09 Feb 2017 15:54:55 +0000 http://starttorun.info/?p=1116 What? Steps Carousel is a Data Field for watches that have the ability to install Connect IQ applications (all modern Garmin watches). After pressing start this field shows a carousel with changing information, it shows each value for 5 seconds: Total Steps Active Steps Steps To Go / Steps Done Too Much Goal Percentage (Steps ...read more

    Dit bericht Steps Carousel Data Field komt van: Start To Run.

    ]]>
    What?

    Steps Carousel is a Data Field for watches that have the ability to install Connect IQ applications (all modern Garmin watches).

    After pressing start this field shows a carousel with changing information, it shows each value for 5 seconds:

    • Total Steps
    • Active Steps
    • Steps To Go / Steps Done Too Much
    • Goal Percentage (Steps vs Steps Goal)

    Ideal for walkers who want to be motivated to reach their daily step goal! 🙂

    Download

    Steps Carousel Data Field in the Connect IQ Store

    Interested in creating an app like this yourself?
    Check out my Garmin Connect IQ Tutorial

    Dit bericht Steps Carousel Data Field komt van: Start To Run.

    ]]>
    http://starttorun.info/steps-carousel-data-field/feed/ 0