The Raspberry Pi Thread [4]


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

    caperjack said:
    great thanks ,,

    I just setup the THP.py file and it runs fine .. what is the THPUV.py file for ..
    THPUV.py is the file I use with my portable weather clock. It has a Si1145 light sensor module on it to measure UV light and ambient light. It displays the UV index along with all the other stuff. I also use the ambient light reading to auto adjust the LED matrix brightness etc. Text goes all white in very bright light to make reading it easier. I have a hard time seeing Red and Blue in very bright light. At night when its dark it auto dims the LED Matrix and turns off the 10mm LED indicators.
    You can do some of that with the joystick on yours. Stick up, LED bright, stick down DIM. It defaults to DIM, If you want full bright by default change sense.low_light = True, to sense.low_light = False, or rem that line out with a #. I have a diffuser on mine and the low setting looks better. Stick to the right all white text, stick left colored text. Stick press in the center does a shut down. I can't access the joystick on my portable without taking the clear cover off so I set it up to do it all on its own based on how bright the light is around it. One less hole for rain or snow to get in. This one is as waterproof as I can make it and still work. Just a couple of strategically placed vent holes so it can measure the pressure and humidity. Temps read too high even with vent holes so I mounted a BMP180 temp sensor on the outside bottom of the case. I keep both files close by because if I find a typo in one, odds are I made the same error in the other. They share a big chunk of code.
      My Computer


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

    ok,thank
    alphanumeric said:
    THPUV.py is the file I use with my portable weather clock. It has a Si1145 light sensor module on it to measure UV light and ambient light. It displays the UV index along with all the other stuff. I also use the ambient light reading to auto adjust the LED matrix brightness etc. Text goes all white in very bright light to make reading it easier. I have a hard time seeing Red and Blue in very bright light. At night when its dark it auto dims the LED Matrix and turns off the 10mm LED indicators.
    You can do some of that with the joystick on yours. Stick up, LED bright, stick down DIM. It defaults to DIM, If you want full bright by default change sense.low_light = True, to sense.low_light = False, or rem that line out with a #. I have a diffuser on mine and the low setting looks better. Stick to the right all white text, stick left colored text. Stick press in the center does a shut down. I can't access the joystick on my portable without taking the clear cover off so I set it up to do it all on its own based on how bright the light is around it. One less hole for rain or snow to get in. This one is as waterproof as I can make it and still work. Just a couple of strategically placed vent holes so it can measure the pressure and humidity. Temps read too high even with vent holes so I mounted a BMP180 temp sensor on the outside bottom of the case. I keep both files close by because if I find a typo in one, odds are I made the same error in the other. They share a big chunk of code.
      My Computer


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

    Just about to go set the USB Boot BIT on my spare 3B. I'm flashing my hard drive as I type this. I plugged it in first to make sure it was accessible and was getting enough power to run from the USB port on the Pi.
      My Computer


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

    Not working so far. Running $ vcgencmd otp_dump | grep 17: from terminal gets me a command not found message? From here, https://www.raspberrypi.org/document...otmodes/msd.md

    EDIT: never mind, figured it out, one to many $, it should be vcgencmd otp_dump | grep 17: and I get the 17:3020000a. I may redo my drive, I was plugging and unplugging thumb drives while it was imaging, maybe I glitched it or something.
      My Computer


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

    Doesn't like my SATA hard drive, might be a power issue not sure. I'm using one of those SATA to USB adapters that just plugs into the drive. No secondary power. I put my SD card in my USB card reader and it booted from it, so I know USB Boot is working. It just won't boot from that old laptop hard drive. I can hear it spin up but no activity lite. Works in file explorer on that Pi so not sure what's up. I have an even older IDE laptop drive in a USB enclosure I may try. Will have to image it first. It's only 60 or 80 gig or something, will do for testing.
      My Computer


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

    Got it working, power issue, not enough current to drive the Pi and hard drive. My second one didn't work either. It has the second USB plug for more power so I plugged that into a separate power supply and it then booted. Swapped out the adapter on the SATA drive for one with dual USB plugs (one power and one power + Data) and it now boots OK with the extra power supply. The power supply on the Pi is only 2A, it was all I had in easy reach at the moment. A little slow to boot up but usable. Haven't done much with it yet, just happy to get it working. This may be a mod to my bread board rig. I can hide the drive underneath and do up a custom power feed to it. Maybe? An SSD is the way to go I think. I don't have the funds for that though.
      My Computer


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

    Boot up seems a little slower. Seems fast enough once its to the desktop though. I may not be a good judge though as I've been playing with Zero's and A+'s lately, all single core Pi's. I haven't touched a 3B in a while.

    The USB Boot Bit is set by default on the 3B+ so you won't have to fart around with the terminal there jack, to get it working. I used etcher for one drive and win32 disk imager for the other. Same way I do my SD Cards.
      My Computer


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

    Went to Staples and scored 3 16 GB Lexar Micro SD cards for 12.50 each and a 32 gig for 22.40. I'm sure I could find lower online, but I like just going and getting them in a brick and motor store. I would have got a few more but I took all they had left, lol. I also scored 3 "Retrak 2000mah Power Bank - Micro Usb Cable - Provides 1 Full Chg To Most Phones" for 4 bucks each. They were marked down from 9.99 to 6.99 then to 3.99. Rechargeable too which wasn't obvious from the packaging. Grabbed the last 3 they had in the bin. It looks like they are 2000 MAH and up 1000ma out. Should be enough to run a Pi Zero for a while. I may try one with my rover just for fun, 1A out might be iffy though?
    https://www.pc-canada.com/item/ETESPB2.html I can't find it on the actual manufacturers web site, likely discontinued or something?
      My Computer


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

    good deals ,,, but you could have left some for me ,lol
    I will not be over your way today ,but tomorrow for sure
    alphanumeric said:
    Went to Staples and scored 3 16 GB Lexar Micro SD cards for 12.50 each and a 32 gig for 22.40. I'm sure I could find lower online, but I like just going and getting them in a brick and motor store. I would have got a few more but I took all they had left, lol. I also scored 3 "Retrak 2000mah Power Bank - Micro Usb Cable - Provides 1 Full Chg To Most Phones" for 4 bucks each. They were marked down from 9.99 to 6.99 then to 3.99. Rechargeable too which wasn't obvious from the packaging. Grabbed the last 3 they had in the bin. It looks like they are 2000 MAH and up 1000ma out. Should be enough to run a Pi Zero for a while. I may try one with my rover just for fun, 1A out might be iffy though?
    https://www.pc-canada.com/item/ETESPB2.html I can't find it on the actual manufacturers web site, likely discontinued or something?
      My Computer


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

    caperjack said:
    good deals ,,, but you could have left some for me ,lol
    I will not be over your way today ,but tomorrow for sure
    It surprised me a bit that they had so few stock? I was glad I was first one in the door. I guess staff could have snagged some for themselves? I had planed to buy 6 16 gig. I have spare SD cards now so I'm happy.
      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 17:18.
Find Us




Windows 10 Forums