Zerynth r2.3.1 is now available with 1 new board supported, 2 new libraries and great new features


#1

Hey there,

Zerynth version r2.3.1 is out with new devices, libraries, and improvements.

A detailed list of changes follows.

- New Sony Spresense Device (CXD5602 Microcontroller)

Spresense is a compact development board based on Sony’s power-efficient multicore microcontroller CXD5602. It allows developers to create applications in a very short time and is supported by Zerynth with the new NuttX based Virtual Machine.

  • Integrated GPS - The embedded GNSS with support for GPS, QZSS and GLONASS enables applications where tracking is required (Dedicated Library - More info here).
  • Multicore microcontroller - Spresense is powered by Sony’s CXD5602 microcontroller (ARM® Cortex®-M4F × 6 cores), with a clock speed of 156 MHz.

More info (1)

- New Fortebit Polaris Dedicated Module

This library has been written to be used with the new Polaris 3G device provided by Fortebit, allowing the user to easily access all the available features of the board.

This module provides easy access to the Polaris 3G board features (and its future versions - 2G, LTE, NB-IoT) with meaningful names for MCU pins and peripherals, simplified initialization of on-board components.

More info (1) (2)

- New Vishay VCNL4200 Proximity Sensor Library

VCNL4200 integrates a high sensitivity long-distance proximity sensor (PS), ambient light sensor (ALS), and
940 nm IRED into one small package.

  • Proximity functions:

    • Immunity to red glow (940 nm IRED)
    • Intelligent background light cancellation
    • Smart persistence scheme to reduce PS response time
    • Proximity distance up to 1.5 m
  • Ambient light functions:

    • Fluorescent light flicker immunity
    • Spectrum close to real human eye responses
    • Selectable maximum detection range (197 / 393 / 786 / 1573) lux with highest sensitivity 0.003 lux/step

More info (1)

VCNL4200

- New Zerynth Feature - Python Conditional Compilation

With Zerynth r2.3.1 you can perform a conditional compilation in Python inserting in your *.py application sources the following syntax (example below):

#-if FEATURE_ENABLED
        do_feature()
#-else
        ##-if DEBUG_ENABLED
        print("feature disabled! Enable it in project.yml")
        ##-endif
        raise UnsupportedError
#-endif

Then you must add all your defines in the project.yml file (example below):

config:
    # enable feature
    FEATURE_ENABLED: null
    # enable debug
    DEBUG_ENABLED: true

and according to the value of the defines, the code inside the conditional Python block will be included or excluded.

Note1: Conditional blocks can be nested according to the number of # before the define.
Note2: Conditional compilation is available also for device target according to the devices you selected (virtual device) or connected (physical device) without inserting the define inside the “project.yml” file - see example below:

#-if esp32_devkitc
    from espressif.esp32net import esp32wifi as wifi_driver 
#-endif

To discover the device target for each Zerynth supported device you can run from terminal this command:

ztc info --devices

- Minor Fixes

Following libraries have been fixed:

  • Google Cloud IoT Library: Reconnection after token expiration.
  • Zerynth MQTT Library: New check on connection and reconnection.
  • Crypto module in Stdlib: SHA3 HMAC calculation.

How to update?

Now you need to update all the packages to the version r2.3.1. To do this you have just to:

  1. Start the new Zerynth Installer;
  2. Open Zerynth Studio ;
  3. Click “System Update”;
  4. Click “Update” and restart Zerynth Studio
  5. Follow the wizard and enjoy!

Remember to virtualize again all boards with the new virtual machines!

Happy coding!

As usual, please keep us informed of issues for this update.

If you have any ideas for projects, examples, applications, and how-tos, don’t hesitate to post them on our Hackster page and here on our Community Forum !

And don’t forget to stay tuned and follow us on Twitter @Zerynth and Facebook @Zerynth for real-time updates or subscribe to our newsletter!

Enjoy this new release and happy coding!


#2

#3

#4