djmcg

Members
  • Content Count

    45
  • Joined

  • Last visited

 Content Type 

Forums

Member Map

Store

Crowdfunding

Raffles

Applications

Calendar

Posts posted by djmcg


  1. Update code

    But nothing chnage 

    (however i just lern how to use "" twice  :) Thanks (\" did`t know\" )

    import os
    import time
    
    White = "/root/Downloads/ws2812-spi/ws2812.py -c \"[[255,255,255]]\" -n 1"
    Green = "/root/Downloads/ws2812-spi/ws2812.py -c \"[[0,255,0]]\" -n 1"
    Blue =  "/root/Downloads/ws2812-spi/ws2812.py -c \"[[0,0,255]]\" -n 1"
    Red = 	"/root/Downloads/ws2812-spi/ws2812.py -c \"[[255,0,0]]\" -n 1"
    Off = 	"/root/Downloads/ws2812-spi/ws2812.py -c \"[[0,0,0]]\" -n 1"
    y = 0.5
    
    while True:
    	
    	os.system(White)
    	print("white")
    	time.sleep(y)
    	os.system(Off)
    	print("sleep")
    	time.sleep(y)
    	
    	os.system(Blue)
    	time.sleep(y)
    	os.system(Off)
    	time.sleep(y)
    	
    	os.system(Green)
    	time.sleep(y)
    	os.system(Off)
    	time.sleep(y)

     


  2. Hello

    few day ago I install  one again ARMBIAN in my OPI WIN PLUS

    this version

    https://dl.armbian.com/_old/orangepiwin/archive/Armbian_19.11.4_Orangepiwin_bionic_current_5.3.13_desktop.img.gz

     

    When I was typing

    armbian-config

    The loading config setting was missing

    sudo apt-get install armbian-config

    and after install. when I login via putty

    I see screen like below

    before that I don`t have any main screen

    Could You advice what`s heppen

     

    (when I was first install those image (.5.3.13_desktop.img.gz)

    I`m remember the OPI WIN screen.

    Snap2.jpg


  3. I just uninstall python-numpy an color back to normal.

     

    I would like to wrote some short code for change colors in python

    Could You advice how to implement this

    commands for code

    On 12/31/2019 at 6:13 PM, martinayotte said:

    # Make 16 LEDs red ./ws2812-spi/ws2812.py -c "[[0,255,0]]" -n 16 # Make 16 LEDs white ./ws2812-spi/ws2812.py -c "[[255,255,255]]" -n 16 # Switch 16 LEDs off ./ws2812-spi/ws2812.py -c "[[0,0,0]]" -n 16

     


  4. Hello thank for reply:

    16 hours ago, martinayotte said:

    Connect the data line of the WS2812B Neopixels to pin SPI1_MOSI/PA15

    I Have the OPI WIN not Zero so I connect to SPI1_MOSI/PD2 hope it`s good.

     

    Next I edit the /boot/armbianEnv.txt file like below :

    7226695300_1577872340_thumb.jpg

    and saved.

    Next steps like You wrote please check:

    5631425300_1577872422_thumb.jpg

    Unfortunately I have error:

    9246514600_1577872514_thumb.jpg

     

    Could You advice what I`m doing wrong?

     

     


     


  5. After reboot is fine.

    However I forgot mentioned I`m update script

    #!/bin/bash
    
    echo 37 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio37/direction
    echo 38 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio38/direction
    echo 39 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio39/direction
    echo 101 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio101/direction
    echo 36 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio36/direction
    
    while true; do
    
    #led1	
    	echo 1 > /sys/class/gpio/gpio37/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio37/value
    	sleep 0.01
    	
    #Led2
    	echo 1 > /sys/class/gpio/gpio38/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio38/value
    	sleep 0.01
    	
    # led3
    	echo 1 > /sys/class/gpio/gpio39/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio39/value
    	sleep 0.01
    	
    #led4
    	echo 1 > /sys/class/gpio/gpio101/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio101/value
    	sleep 0.01
    #led5
    	echo 1 > /sys/class/gpio/gpio36/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio36/value
    	sleep 0.01
    #led4
    	echo 1 > /sys/class/gpio/gpio101/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio101/value
    	sleep 0.01
    # led3
    	echo 1 > /sys/class/gpio/gpio39/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio39/value
    	sleep 0.01
    	
    #Led2
    	echo 1 > /sys/class/gpio/gpio38/value
    	sleep 0.25
    	echo 0 > /sys/class/gpio/gpio38/value
    	sleep 0.01
    	
    	
    	
    done

    Those command works

    echo 0 > /sys/class/gpio/gpio37/value

     

    Snap69.jpg