frame

IoT Ambient Light: Zerynth Lamp

igninja Member
edited May 23 in Project Guidance
I am trying to replicate Zerynth Lamp project, using Particle Photon for control. It does not compile, since it was created by the earlier version of Zerynth. Please help to modify this code for the latest version of Code Studio. By the way I am not planing to use any shield, Photon has its own WiFi on board.

Regards



Comments

  • edited March 8
    Hi igninja,

    The new release r2.0.5 is available with new features for the Zerynth App and the Zerynth Advanced Device Manager!!!

    Here a link to our documentation for the new Zerynth App and ZADM

    Note: In the project files you have to change the code regarding the imports:

    file main.py
    # import needed modules
    import streams
    from broadcom.bcm43362 import bcm43362 as wifi_driver
    from wireless import wifi
    import animation

    file animation.py
    from adafruit.neopixel import ledstrips as neo
    import threading

    Let me know if everything works :)
    Matteo Cipriani
    Zerynth Support Team
  • igninja Member
    I am getting an error:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\goltman\\zerynth2\\tmp\\native_cache\\0798e1b8d39f468b2fc9d52468676127b5b65eff_C__Users_goltman_Dropbox_OSRAM_Python_Zerynth_Zerynth_Lamp_particle_photon\\particle_photon_C__Users_goltman_zerynth2_dist_r2.0.5_libs_official_adafruit_neopixel_csrc_ledstrips_ledstrips.c.o'
  • Hi igninja,

    Can you post me the entire log message section?
    Have you created properly a new project with the three files (main.py, animation.py, and template.html)?

    Thanks
    Matteo Cipriani
    Zerynth Support Team
  • igninja Member
    Loading settings...
    Ready!
    Checking for updates...
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\__builtins__.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\__builtins__.py
    [info] ########## STEP 0 - first pass
    [info] Compiling module: __main__ @ C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\main.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\__builtins__.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\__builtins__.py
    [info] Compiling module: __builtins__ @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\__builtins__.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\streams.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\streams.py
    [info] Compiling module: streams @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\streams.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\broadcom\bcm43362\bcm43362.py
    [info] Compiling module: broadcom.bcm43362.bcm43362 @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\wireless\wifi.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\wireless\wifi.py
    [info] Compiling module: wireless.wifi @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\wireless\wifi.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\animation.py
    [info] Compiling module: animation @ C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\animation.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\adafruit\neopixel\ledstrips.py
    [info] Compiling module: adafruit.neopixel.ledstrips @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\threading.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\threading.py
    [info] Compiling module: threading @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\threading.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zerynthapp\zerynthapp.py
    [info] Compiling module: zerynthapp.zerynthapp @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zadm\zadm.py
    [info] Compiling module: zadm.zadm @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zadm\zadm.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\socket.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\socket.py
    [info] Compiling module: socket @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\socket.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\json.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\json.py
    [info] Compiling module: json @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\json.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\queue.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\queue.py
    [info] Compiling module: queue @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\queue.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\timers.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\timers.py
    [info] Compiling module: timers @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\timers.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\vm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\vm.py
    [info] Compiling module: vm @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\vm.py

  • igninja Member
    [info] ########## STEP 0 - second pass
    [info] Compiling module: __main__ @ C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\main.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\__builtins__.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\__builtins__.py
    [info] Compiling module: __builtins__ @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\__builtins__.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\streams.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\streams.py
    [info] Compiling module: streams @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\streams.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\broadcom\bcm43362\bcm43362.py
    [info] Compiling module: broadcom.bcm43362.bcm43362 @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\broadcom\bcm43362\bcm43362.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\wireless\wifi.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\wireless\wifi.py
    [info] Compiling module: wireless.wifi @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\wireless\wifi.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\animation.py
    [info] Compiling module: animation @ C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\animation.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\adafruit\neopixel\ledstrips.py
    [info] Compiling module: adafruit.neopixel.ledstrips @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\adafruit\neopixel\ledstrips.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\threading.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\threading.py
    [info] Compiling module: threading @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\threading.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\zerynthapp\zerynthapp.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zerynthapp\zerynthapp.py
    [info] Compiling module: zerynthapp.zerynthapp @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zerynthapp\zerynthapp.py

  • igninja Member
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\zadm\zadm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zadm\zadm.py
    [info] Compiling module: zadm.zadm @ C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\zerynth\zadm\zadm.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\socket.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\socket.py
    [info] Compiling module: socket @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\socket.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\json.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\json.py
    [info] Compiling module: json @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\json.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\queue.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\queue.py
    [info] Compiling module: queue @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\queue.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\timers.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\timers.py
    [info] Compiling module: timers @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\timers.py
    [info] Searching for C:\Users\goltman\Dropbox\OSRAM\Python\Zerynth\Zerynth_Lamp\vm.py
    [info] Searching for C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\vm.py
    [info] Compiling module: vm @ C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\vm.py
    [info] ########## STEP 1 - C code compilation
    [info] Including precompiled binary C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\broadcom\bcm43362\rvo\bcm43362_usi9.rvo
    [info] Getting C:\Users\goltman\zerynth2\dist\r2.0.5\stdlib\csrc\threading\stdlib_threading.c from cache
    [info] Getting C:\Users\goltman\zerynth2\dist\r2.0.5\vhal\armcmx\stm32f2\vhal_dma.c from cache
    [info] Getting C:\Users\goltman\zerynth2\dist\r2.0.5\vhal\armcmx\stm32f2\vhal_sdio.c from cache
    [info] Compiling C:\Users\goltman\zerynth2\dist\r2.0.5\libs\official\adafruit\neopixel\csrc\ledstrips\ledstrips.c
    [fatal] Unexpected exception
    Traceback (most recent call last):
      File "C:\Users\goltman\zerynth2\dist\r2.0.5\ztc\compiler\compilercmd.py", line 75, in compile
        binary, reprs = compiler.compile()
      File "C:\Users\goltman\zerynth2\dist\r2.0.5\ztc\compiler\compiler.py", line 411, in compile
        self.cncache.add_object(cfile,hfile,cheaders[cfile])
      File "C:\Users\goltman\zerynth2\dist\r2.0.5\ztc\compiler\codecache.py", line 34, in add_object
        fs.copyfile(ofile,cfilename)
      File "C:\Users\goltman\zerynth2\dist\r2.0.5\ztc\base\fs.py", line 91, in copyfile
        shutil.copyfile(src,dst)
      File "C:\Users\goltman\zerynth2\sys\python\lib\shutil.py", line 115, in copyfile
        with open(dst, 'wb') as fdst:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\goltman\\zerynth2\\tmp\\native_cache\\0798e1b8d39f468b2fc9d52468676127b5b65eff_C__Users_goltman_Dropbox_OSRAM_Python_Zerynth_Zerynth_Lamp_particle_photon\\particle_photon_C__Users_goltman_zerynth2_dist_r2.0.5_libs_official_adafruit_neopixel_csrc_ledstrips_ledstrips.c.o'

  • igninja Member
    I created project with three files and did suggested modifications. Thanks for your help.
  • Ok,

    I see you have your project inside a dropbox folder?is it right?
    Try to move in another folder (or create another project with the same files) for example in the desktop and try again. :)
    Matteo Cipriani
    Zerynth Support Team
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.