frame

Flip & Click support, an updated stdlib and more...

Hello,

fresh new release with some nice goodies!

First of all, the support for Mikroelektronika Flip & Click board based on the Sam3X: just search for "mikroe" in the Package Manager and install the board support. It will be recognized both as Arduino Due and Flip & Click Sam3X (both boards mount the same ftdi chip). Pick Flip & Click Sam3X from the board toolbar and the IDE will recognize your Flip & Click every time you plug it.

Also, new versions for:
  • core.zerynth.ide: added a workaround for board discovery in Ubuntu as reported here
  • core.zerynth.stdlib:
    • fixed a bug in the requests module
    • added the queue and fifo modules for producer/consumer problems
    • added the flash module to write to the internal flash of the mcu
    • dac module for..well, dac! (Check the examples in the IDE)
    • new threading primitives: Thread class and Condition class
  • core.zerynth.compiler: fixed a bug in bytecode name handling (was complaining after 127th name in a module)
  • New VMs: revirtualize your boards. The Particle Photon now has support for DAC! Support also coming for Atmel mcus in a few days

Giacomo Baldi
Zerynth Head of Software Development

Comments

  • Great work! Loving the new threading class methods. Tried the new queue class and works with no issues between threads.

    Just curious on what would be a good method for determining the starting address for flash write operations?

  • The coolness of Zerynth never ends! Can't wait to test the new features!
  • Oh,  and I forgot to mention that cc3000 and bcm43362 libraries have been deprecated in favour of brand new broadcom.bcm43362 and texas.cc3000 libraries. The names have changed to fit the Zerynth naming scheme (manufacturer.chip) and they have been optimized.  ;)
    Giacomo Baldi
    Zerynth Head of Software Development
  • I did all the updates in Zerynth for Windows but it still reads the old way of importing the broadcom wifi driver. The new style "from broadcom.bcm43362 import bcm43362 as wifi_driver" is reported as error.

    So I went into the package manager and unistalled the old bcm driver, but the problem is still there.
  • kenrkenr Member
    I have noted that the driver directory has been named "boradcom" by the installer.
    Try renaming it to "broadcom" and see if this fixes your problem.
    It fixed it for me.
    Ken
  • It worked, good finding! Thank you for sharing!
  • kenrkenr Member
    I cannot get the Zerynth App TOI example to work since updating to this version.
    I'm using the latest version of the app (4.4) on my Android phone.
    It would appear that values are not being passed to the template using vp.notify/ZerynthApp.listen.
    I always get 'undefined' in the template on my Android phone.
    If I print out the values they appear as realistic double digit integer values.
    I have tried this on both my Photon and Nucleo without success.
    I'm using the new wifi drivers for both boards (after renaming the boradcom sub-directory correctly. See above).
    Has this example been tested by any one successfully since the latest upgrade?
    By the way it would be good if the update had uninstalled the previous CC3000 and bcm44362 modules.
    Any help would would be appreciated.
  • matrix866matrix866 Member
    edited April 2016
    Any example of the Thread class? It would be very appreciated.
  • matrix866matrix866 Member
    edited April 2016
    I think the Thread Class may have a bug. 
    import streams
    import threading
    streams.serial()
    
    try:
        def one(message1):
            while True:
                print("one")
                print(message1)
                sleep(2000)
    
    
        sleep(2000)
        print("start")
        OBJ_THREAD1 = threading.Thread(one,'thread1',('message1',)) #WATCH the "," HERE
    
    
        OBJ_THREAD1.start()
    except Exception as e:
        print(e)
    If no "," is written after the first argument I don't get the "message1" print.
  • @kenr ;
    Thanks for the boaradom typo!
    I tested the basic example and the data flow works. I am going to test the TOI example asap and let you know.

    @matrix866
    the "args" argument of the Thread constructor expects a tuple, so actually the syntax "(...,)" is the correct one. The usage and syntax of the Thread class is very similar to the standard Python threading.Thread, you can easily refer to the Python docs. However I will surely add Thread examples in the next update.
    Giacomo Baldi
    Zerynth Head of Software Development
  • kenrkenr Member
    Installed all the latest released updates and still have the following issues:

    1. Problem compiling for STM Nucleo F401RE. Getting the error message: 'Error: General Exception!: popitem(): dictionary is empty' whenever I verify the 'ZerynthApp - TOI Shield' example.

    2. Compiled and uploaded latest demo of  ZerynthApp - TOI Shield'. Still giving the same error as reported above on my Android phone. Don't know if this release was intended to resolve it or not.

    Ken
  • kenrkenr Member
    Further to my last post re STM 401RE:
    Problem appears to be related to CC3000 library. Have tried both previous and latest release with same issue.
    Had removed old CC3000 library. Have since reinstalled old library.
    Cloned the latest example and found the CC3000 import has not been updated to from texas.cc3000.
    Hope this helps, bottom out issue.
    Ken
  • Has anybody seen this issue on a Windows 10 installation.
    Does any body have a fix.

    I cannot use Zerynth because of this issue.
    What has happened to the forum?
    I don't seem to get any help any more.

    Ken
  • hi @kenr ;
    please give us more feedback about the win 10 issue you are referring to.
    i am using win 10 without problems.


    Daniele Mazzei
    Zerynth Chief System Architect
  • Attached is the compiler log file after verification of WiFi Scan example modified for use with CC3000 module attached to STM F401RE.

    Still getting the error message: 'Error: General Exception!: popitem(): dictionary is empty' whenever I verify the 'WiFi Scan' example.
    This is the code:

    ################################################################################
    # ZERYNTH wifi scan
    #
    # Created by ZERYNTH Team 2015 CC
    # Authors: G. Baldi, D. Mazzei
    ################################################################################
    # import streams & socket
    import streams
    import socket
    # import the wifi interface
    from wireless import wifi
    # the wifi module needs a networking driver to be loaded
    # in order to control the board hardware.
    # FOR THIS EXAMPLE TO WORK, A NETWORK DRIVER MUST BE SELECTED BELOW
    # uncomment the following line to use the CC3000 driver (Particle Core or CC3000 Wifi shields)
    from texas.cc3000 import cc3000 as wifi_driver
    # uncomment the following line to use the BCM43362 driver (Particle Photon)
    # from broadcom.bcm43362 import bcm43362 as wifi_driver
    streams.serial()
    # init the wifi driver!
    # The driver automatically registers itself to the wifi interface
    # with the correct configuration for the selected board
    wifi_driver.auto_init()
    # a list of security strings
    wifi_sec=["Open","WEP","WPA","WPA2"]
    try:
        print("Scanning for 15 seconds...")
        # start scanning for 15000 milliseconds
        res = wifi.scan(15000)
       
        # if everything goes well, res is a sequence of tuples
        # each tuple contains:
        # -ssid: the name of the network
        # -sec: the security type of the network, from 0 to 3
        # -rssi: the strength of the signal, from 0 to 127
        # -bssid: the mac address of the access point
        for ssid,sec,rssi,bssid in res:
            print(ssid,"::",wifi_sec[sec],":: strength ",rssi*100/127)
    except Exception as e:
        print(e)
    Have totally uninstalled all references to viper and zerynth on my machine an re-installed Zerynth with change.

    The 'Hello Zerynth' example works OK with the STM.

    Hope this helps.
    Ken
    compiler.log 76.1K
  • got it, we are going to update the CC3000 package with the related example asap.
    sorry for our late responses, the team is working hard on the new release of Zerynth :smile: 

    Daniele Mazzei
    Zerynth Chief System Architect
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.