Shop OBEX P1 Docs P2 Docs Learn Events
Platform3 (testing prototype) - Page 2 — Parallax Forums

Platform3 (testing prototype)

2»

Comments

  • RaymanRayman Posts: 15,973

    Actually there's Schottky diode right there so tried powering after that, ~4.8 V.
    That worked color wise, but battery bank still turned out.
    Going to see if two WS2816B is enough...

  • RaymanRayman Posts: 15,973
    edited 2026-01-27 14:42

    Found that two WS2816B LEDs in white draws enough current to keep the battery pack on.

    Tried reducing the on time to conserve power.. 50% duty like below works, but less than that doesn't seem to work...

    PUB Main | pos
    
      strip.start_b(LEDS, STRIP_LEN)                                ' start led driver
      strip.off
    
      repeat
        strip.set_all(strip#white)
        pause(5000)
        strip.set_all(strip#BROWN)
        pause(5000)
    
  • maccamacca Posts: 980

    @Rayman said:
    Was hoping that cheap USB keyboards would support PS/2 mode, but the two tested just now didn't work.

    [...]

    Anyway, going to go forward with dual USB wired for PS/2 instead of real PS/2 just because is smaller and looks better.

    Just in case you missed it, there is a USB driver for the P1 https://github.com/SaucySoliton/propeller-usb-host

  • RaymanRayman Posts: 15,973

    Thanks @macca that looks better than last time I looked at it. Still, main problem there is that I/O pins have to be in 0..7 range.
    Doesn't work in this particular instance...

  • JonnyMacJonnyMac Posts: 9,620

    In a very large number of my P1 projects a launch an internal support cog that runs a 1ms loop and calls very tasks that have their own timing variables. It turns out that you can get quite a lot of work done in a millisecond in the P1. This might be something to consider for your controller -- you're trading one cog (WS28xx) for this; that said, you can control a standard LED and a whole lot more, and use the LED as a 1s "heartbeat" indicator.

    This is the background code in the demo.

    con { background cog }
    
    var
    
      long  bcog                                                    ' background cog #
      long  bcstack[32]                                             ' stack for background cog
    
      long  millis                                                  ' global milliseconds register
    
    
    pri background | t                                              ' launch with cognew()
    
      io.low(LED_26)
    
      millis := 0
    
      t := cnt                                                      ' sync loop timer
      repeat
        waitcnt(t += MS_001)                                        ' run loop every millisecond
        ++millis                                                    ' increment millis
        show_heartbeat
    
    
    var
    
      long  hbms
    
    
    pri show_heartbeat
    
      if (++hbms == 1000)
        hbms := 0
    
      if (hbms < 250)
        outa[LED_26] := 1                                           ' 100%
    '   outa[LED_26] := hbms                                        '  50%
    '   outa[LED_26] := hbms >> 1                                   '  25%
      else
        outa[LED_26] := 0
    
  • RaymanRayman Posts: 15,973

    @JonnyMac Something to keep in mind...

    @macca Will see if can add pads for pulldowns so could then use for real USB using jumpers at least...

  • RaymanRayman Posts: 15,973

    Here's layout for VGA-PS2(on USB)-stereo-mic board, adapted from P2 version. Same size, but this one has a lot more resistors and caps...

    911 x 1148 - 143K
Sign In or Register to comment.