The Raspberry Pi Thread [4]


  1. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1091

    I just set everything up out on my deck to do some Pi tinkering. Just flashing some images to my cards at the moment. I'll post back with any info I think might be relevant.
      My Computer


  2. Posts : 5,707
    insider build 10586.3 win10 pro 64
       #1092

    sound good,thanks, i have to go to work for a few hrs today ,and my daughter and the 2 kids are here till tomorrow,so i might not get a chance to do much with it til later tomorrow
    alphanumeric said:
    I just set everything up out on my deck to do some Pi tinkering. Just flashing some images to my cards at the moment. I'll post back with any info I think might be relevant.
      My Computer


  3. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1093

    I'm just getting to the update upgrade stuff. Time for another cup of coffee I think.

    Update: slowly getting things done. Redid my breadboard rig, I wanted the 32 gig sd card that was in it for my bird camera. It glitched doing the upgrade but seemed fine second time around. RTC initially didn't work but after a couple of read write commands it looks to be working now. Just put that away to make some room on my table for the other stuff I'm working on.

    Redid my bird camera with the 32 gig card, motion eye OS. Booted it up long enough to setup the wifi and tweak a few settings. Put it aside for now will get back to it latter on.

    Just started upgrading a new Raspbian image on my indoor weather clock. Pi A+, sense hat and Ds3231 RTC. That's the one I really want to work on today.
    Last edited by alphanumeric; 11 Aug 2018 at 08:18.
      My Computer


  4. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1094

    Scratches head. Just redid my indoor weather clock. I "think" its still reading high? Environment Canada says the humidity is 49%. My outdoor weather clock which uses the BME680 is showing 48%. The indoor weather clock using the sense hat sensor is saying 66%. Both are outside on the table in front of me. Looks like I'll be buying another BME680.
      My Computer


  5. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1095

    Ok, jack here is why I think that night light isn't working. First off, did you run
    Code:
    sudo pip install schedule
    ? If you don't you will get a module not found error. To get my python file to run in python 3 I had to run
    Code:
    sudo pip3 install schedule
    . I ran both one after the other.
    The other thing that's going on, is they didn't set a color for first start up? The way they wrote their file none of the LED's will light up "until" one of those two times has passed. That's why its blank to start with and nothing "appears" to happen.
    This is what I ran on my sense hat, I don't have a unicorn pHat to play with.

    Code:
    import time
    import schedule
    from sense_hat import SenseHat, ACTION_PRESSED, ACTION_HELD, ACTION_RELEASED
    
    sense = SenseHat()
    sense.clear(255, 255, 0)
    
    def yellow ():
      sense.clear()
      sense.clear(255, 255, 0)
      
    def indigo ():
      sense.clear()
      sense.clear(51, 0, 51)
      
    schedule.every().day.at("07:30").do(yellow)
    schedule.every().day.at("19:00").do(indigo)
    
    while True:
        schedule.run_pending()
        time.sleep(10)
    This is what I think you need to run on the unicorn phat.
    Code:
    import time
    import unicornhat
    import schedule
    
    unicornhat.set_layout(unicornhat.PHAT)
    unicornhat.rotation(0)
    unicornhat.brightness(0.5)
    unicornhat.clear()
    unicornhat.show()
    unicornhat.set_all(51, 0, 51)
    unicornhat.show()
    
    
    def yellow ():
      unicornhat.clear()
      unicornhat.show()
      unicornhat.set_all(255, 255, 0)
      unicornhat.show()
    
    def indigo ():
      unicornhat.clear()
      unicornhat.show()
      unicornhat.set_all(51, 0, 51)
      unicornhat.show()
    
    schedule.every().day.at("07:30").do(yellow)
    schedule.every().day.at("19:00").do(indigo)
    
    while True:
        schedule.run_pending()
        time.sleep(10)
      My Computer


  6. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1096

    Backs getting sore so I'm packing it in for now.
      My Computer


  7. Posts : 5,707
    insider build 10586.3 win10 pro 64
       #1097

    alphanumeric said:
    Backs getting sore so I'm packing it in for now.
    thanks for the help. i did do the install schedule just checked and says already satisfied ...,i will try your file and see how it goes ,thanks ,i will try it soon and let you know how it goes.

    ok ,tried running with sudo python3 and it said line 3 ,import error ,no module named schedule ..
    when i do it with just python it doesn't say that ,just give same message as before .. ,,got to stop for now ,will do some more tomorrow maybe or later tonight ,i will format sdcard and start over ,,,it is kind of weird as all the other examples work, but i dont think any of them use schedule
      My Computer


  8. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1098

    caperjack said:
    thanks for the help. i did do the install schedule just checked and says already satisfied ...,i will try your file and see how it goes ,thanks ,i will try it soon and let you know how it goes.

    ok ,tried running with sudo python3 and it said line 3 ,import error ,no module named schedule ..
    when i do it with just python it doesn't say that ,just give same message as before .. ,,got to stop for now ,will do some more tomorrow maybe or later tonight ,i will format sdcard and start over ,,,it is kind of weird as all the other examples work, but i dont think any of them use schedule
    run sudo pip3 install schedule to install it for python 3 "pip3". The command they list only installs it for python 2. The other message is I think, just because you used ctrl c to kill the running program.
    I didn't leave my file running long enough to hit one of those time markers. If you disconnect your wifi and set your time manually you should be able to test it. Just set it say 5 minutes before the time in the file. With the WIFI connected it will just sync with a time server and reset it on you to the correct time.
    You do know who ever you give this too is going to have to set it up for their WIFI right? Its the only way it will have an accurate time. Unless you add a RTC.
      My Computer


  9. Posts : 5,707
    insider build 10586.3 win10 pro 64
       #1099

    alphanumeric said:
    run sudo pip3 install schedule to install it for python 3 "pip3". The command they list only installs it for python 2. The other message is I think, just because you used ctrl c to kill the running program.
    I didn't leave my file running long enough to hit one of those time markers. If you disconnect your wifi and set your time manually you should be able to test it. Just set it say 5 minutes before the time in the file. With the WIFI connected it will just sync with a time server and reset it on you to the correct time.
    You do know who ever you give this too is going to have to set it up for their WIFI right? Its the only way it will have an accurate time. Unless you add a RTC.
    ok ,thanks ,i will try some of that tomorrow ,I was thinking that it had something to do with the time settings .and yea i will deliver it to my daughters and set the wifi

    edit ''''couldn't wait till to morrow ,your suggestion worked ,thank you so much ,,im learning all the time ,,, next Wednesday is my last day at work ,so i will have more time to sit and read and maybe lean something ,,, thanks again
    Last edited by caperjack; 11 Aug 2018 at 18:22.
      My Computer


  10. Posts : 15,037
    Windows 10 IoT
    Thread Starter
       #1100

    caperjack said:
    ok ,i will try some of that tomorrow ,and yea i will deliver it to my daughters and set the wifi
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:05.
Find Us




Windows 10 Forums