The Raspberry Pi Thread [4]


  1. Posts : 5,695
    insider build 10586.3 win10 pro 64
       #1671

    alphanumeric said:
    I didn't break anything, came close once or twice, which was why I stopped.
    I know ,i did, because i didn't stop in time ,i had one and couldn't get it work and got pissed and manually broke it, lol
      My Computer


  2. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1672

    Pics of my almost all red Pi Zero Pibow case. I put a female 90 degree header on it so I can plug it into a black hat hacker board. Thats my Unicorn Hat HD on one of the original Black Hat hacker boards, not the mini one they sell now. I like the old one better for full sized hats.

    The Raspberry Pi Thread [4]-dscf1390m.jpgThe Raspberry Pi Thread [4]-dscf1391m.jpgThe Raspberry Pi Thread [4]-dscf1392m.jpg
      My Computer


  3. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1673

    Worked on my indoor weather clock today. Added an LED Shim to it. It's all wired up, but not coded for use yet. I'll likely tackel that over the weekend. I haven't really decided how I want to display the barometric pressure on it yet.

    The Raspberry Pi Thread [4]-dscf1424m.jpgThe Raspberry Pi Thread [4]-dscf1427m.jpgThe Raspberry Pi Thread [4]-dscf1433m.jpgThe Raspberry Pi Thread [4]-dscf1435m.jpgThe Raspberry Pi Thread [4]-dscf1436m.jpgThe Raspberry Pi Thread [4]-dscf1437m.jpgThe Raspberry Pi Thread [4]-dscf1438m.jpg
      My Computer


  4. Posts : 5,695
    insider build 10586.3 win10 pro 64
       #1674

    Bussy,bussy bussy .. nice work ,as always ..
      My Computer


  5. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1675

    I'm not that fussy with how the jumper wires go over the top but there isn't much I can do about it. At some point I think I'm going to swap them out for shorter ones.
    I had a piece of the Ninja Difusser I had cut off one I had cut down for my 3A+. It made a nice stand for the back and gave me a place to mount the BME680.
    Before I mounted the LED shim that Pi just tilted back. Nothing was touching the ground that shouldn't so no big deal. The LED Shim once mounted was touching though. so I had to prop the back up to level it out.
    Other wise it was all tilted sideways and crooked. It just didn't sit nice and level horizontally. The existing holes in the piece of difusser lined up perfectly with the mounting holes in the Pi A+. Just had to trim the bottom a bit with my dremel to make it the right height.
    The python code is the next part. I have that same LED Shim mounted in the same position in my portable weather clock. It's currently showing the temperature. Basically a colored thermometer. This time of year doing that on my indoor one would be a bit of a waist. It will just sit at 22c all day. Thats why I decided to show the barometric pressure on it. A quick glance indicator as to is it stormy out etc. Haven't decided exactly how I want to do it yet though. The color of the LED's will be the main indicator, then maybe a secondary marker to show how much it is that range. Something like that. It will be trial and error. Code it and see if I like it and its understandable.
      My Computer


  6. Posts : 5,695
    insider build 10586.3 win10 pro 64
       #1676



    I tinker a bit every day,not getting much done ...
      My Computer


  7. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1677

    Off and on for me. Some days I can spend most of the day working on something. Other days not so much. I like to spend a day doing fabrication. Then the next (two or three ) just doing the software part.
    The big satisfaction for me is having something nobody else has. Or being the first to build it etc. Like my weather clocks. Thats been a never ending project. I just keep adding to it and changing how it works.
    It started out pretty simple, Pi A+ and Sense Hat. Its way beyond that now. Lots and lots of fun though, with a mix of frustration if I'm honest lol.
    Anyway, I'll hook my indoor weather clock up to a monitor and keyboard some time today and have at it. I have a few errands to run after the morning walk but the rest of the day is pretty well free.
    I want to get back to tinkering with my Unicorn Hat HD too. I need to hunt up a power supply though. Really need to order one or two more. I may gear something up so I can use one of the ones I have with the barrel jacks, they are 3A. I think I have a spare pigtail kicking around. I'll solder on a couple of female jumpers and just plug it into the male header on the Black hat hacker board.
      My Computer


  8. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1678

    Well, the math gets interesting again, lol. Basically I have 5 bands or ranges
    X to 981mb Very low
    982 - 1003 Low - 1003 - 982 = 21
    1004 - 1025 Mid Range - 1025 - 1004 = 21
    1026 - 1047 High - 1047 - 1026 = 21
    1048 - X Very high
    Thats 21 mb per range and my LED shim is 28 LEDs. Thats an easy conversion though right? Divide by 3 and then multiply by 4.
    Then round off for a number between 1 and 28. Then subtract 1 to get it so its 0 to 27. The first LED is addressed as 0.

    The other wrinkle is my LED shim is basically upside down, 0 at the top and 27 on the bottom. This time its not an issue though.
    I'll take my max number for that range and subtract the actual pressure from it. That gets me a number between 1 and 21. And as a bonus, the lower the actual pressure is, the "higher" that number is. Just what I want.
    That puts my marker lower down the scale. As an example

    elif p >= 982 and p < 1004: # Low
    ledshim.set_all(255, 255, 0) # Yellow
    M = ((1003 - p) / 3) *4
    M = M - 1
    M = round(M)
    ledshim.set_pixel(M, 255, 255, 255)

    Somethings not right with the math though? If the pressure is 1003mb its 1003 - 1003 = 0, 0 / 3 x 4 = 0, round off and subtract 1 = -1. << Ops?
    If the pressure is 982mb its 1003 - 982 = 21, 21 /3 x 4 = 28, round off and subtract 1 = 27. My marker will be at the very bottom of my scale where I want it.

    If I don't subtract the 1 the first calculation works out to 0, but the 27 becomes 28? That will throw up an out of range error, same as the -1 will.

    I think what I'm going to do is just add an If M < 0 M = 0. I think what's going on is my range is actually 22 mb not 21. I'm sticking with 21 though as it makes the math easier.

    Haven't actually run my code yet, just sketching it out. I have errands to run so it will have to wait until latter on today.
    Last edited by alphanumeric; 04 Jan 2019 at 12:23.
      My Computer


  9. Posts : 5,695
    insider build 10586.3 win10 pro 64
       #1679

    over my head, me and anything over basic math never got along ,just ask any of my math teachers ,lol
    alphanumeric said:
    Well, the math gets interesting again, lol. Basically I have 5 bands or ranges
    X to 981mb Very low
    982 - 1003 Low - 1003 - 982 = 21
    1004 - 1025 Mid Range - 1025 - 1004 = 21
    1026 - 1047 High - 1047 - 1026 = 21
    1048 - X Very high
    Thats 21 MB per range and my LED shim is 28 LEDs. Thats an easy conversion though right? Divide by 3 and then multiply by 4.
    Then round off for a number between 1 and 28. Then subtract 1 to get it so its 0 to 27. The first LED is addressed as 0.

    The other wrinkle is my LED shim is basically upside down, 0 at the top and 27 on the bottom. This time its not an issue though.
    I'll take my max number for that range and subtract the actual pressure from it. That gets me a number between 1 and 21. And as a bonus, the lower the actual pressure is, the "higher" that number is. Just what I want.
    That puts my marker lower down the scale. As an example

    elif p >= 982 and p < 1004: # Low
    ledshim.set_all(255, 255, 0) # Yellow
    M = ((1003 - p) / 3) *4
    M = M - 1
    M = round(M)
    ledshim.set_pixel(M, 255, 255, 255)

    Somethings not right though with the math though?If the pressure is 1003mb its 1003 - 1003 = 0, 0 / 3 x 4 = 0, round off and subtract 1 = -1. << Ops?
    If the pressure is 982mb its 1003 - 982 = 21, 21 /3 x 4 = 28, round off and subtract 1 = 27. My marker will be at the very bottom of my scale where I want it.

    If I don't subtract the 1 the first calculation works out to 0, but the 27 becomes 28? That will throw up an out of range error, same as the -1 will.

    I think what I'm going to do is just add an If M < 0 M = 0. I think what's going on is my range is actually 22 mb not 21. I'm sticking with 21 though as it makes the math easier.

    Haven't actually run my code yet, just sketching it out. I have errands to run so it will have to wait until latter on today.
      My Computer


  10. Posts : 15,010
    Windows 10 IoT
    Thread Starter
       #1680

    It was even more fun when I did it with temperature for my portable. My LED shim being basically upside down really complicated my calculations. And no easy way to mount it the other way round. I already had it all soldered anyway and wasn't changing it unless I really had to. I wanted my marker to go up as temp increased, that meant reversing my marker calculations. Multiplying by -1 to get + numbers. And make it count backwards lol.
    I'll likely test my new code after supper tonight. Backs a bit sore so I'm just going to relax a bit for now.
      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 05:38.
Find Us




Windows 10 Forums