gw_shadow

Eurobricks New Members
  • Content Count

    9
  • Joined

  • Last visited

About gw_shadow

Spam Prevention

  • What is favorite LEGO theme? (we need this info to prevent spam)
    Mindstorms
  • Which LEGO set did you recently purchase or build?
    51515

Contact Methods

  • Website URL
    https://gpdaniels.com

Profile Information

  • Interests
    Software, Robots, and Lego!

Extra

  • Country
    UK

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. In the app on my phone: Go to the coding page Click the connect to hub button in the top right. Connect to the hub Go back to the coding page Click the connect to hub button in the top right again, this time you will get a page showing you the status of the hub. Click the vertical "..." button near the top on the right. This gives you the options: "Rename hub", "Reset Hub", and "Update motors" Click "Update motors"
  2. I've tried that too. If I run this script: from hub import display from utime import sleep display.clear() sleep(1) display.pixel(0,0,100) sleep(1) display.rotation(90) sleep(1) display.pixel(0,0,100) sleep(1) display.rotation(90) sleep(1) display.pixel(0,0,100) sleep(1) display.rotation(90) sleep(1) display.pixel(0,0,100) sleep(1) display.rotation(90) sleep(1) I get this result: I'm at a loss. Ah, and if I run it twice in a row without doing a soft reset in between it does this... --- Edit: Ah the reason for the first result being super weird (jumping 180) seems to be some internal state that only gets applied after the first rotate call, if I do a hard reset then run the script it only jumps 90 and otherwise follows the same pattern as the final gif.
  3. I'm happy with them staying activated, I'm just confused about what rotate is actually doing. I'd either expect it to rotate what's on the screen but not change the indexing of pixels (so 0,0 is always the top left) Or I'd expect it to rotate what's on the screen and change the indexing (so 0,0 would be the top right after a 90 degree rotation and it would be the bottom right after a 180 degree rotation) Neither of these is what happens.
  4. Does anyone know of a method of getting some clarification on what the expected output of programs should be? I've tried going through LEGO Customer Service but I'm not really getting anyway (they also can't receive images / videos via the support emails so that makes it harder) I've been writing some small testing scripts to extract behaviours of the different micropython functions on the hub but some of the outcomes are odd. Here's an example in the app using the blocks: Or in micropython: from hub import display from utime import sleep display.pixel(0,0,100) sleep(1) display.rotation(90) sleep(1) display.pixel(0,0,100) sleep(1) display.rotation(-90) sleep(1) display.pixel(0,0,0) They both give the same results: While I would expect it to have done something like this:
  5. So you'd need to convert the files to wav, at 16KHz as you've done, you then need to remove the wav header from the file leaving just the 16bit sound samples. There is a conver_sound.py python script that can do all of this. [ https://github.com/nutki/spike-tools ] You then need to upload this binary sound file to the hub filesystem, you can use rshell for this, [ https://github.com/dhylands/rshell ] This was my process on linux, on windows the /dev/ttyACM0 will probably be a com port name. rshell -a > connect serial /dev/ttyACM0 115200 > cp ./MY_SOUND_FILE /pyboard/sounds/MY_SOUND_FILE Next you need to play the sound. As a python script uploaded to the board (or run on the Micropython REPL over a serial connection) that looks like this: import hub hub.sound.play("sounds/MY_SOUND_FILE")
  6. The sound format is literally just the raw 16 bit samples from a wav file at a sample rate of 16000 Hz. I've just written a small python script that can play the samples ripped from the SPIKE Prime / Robot Inventor hubs. [ It's currently baked into my simulator ] Interestingly the latest firmware for the SPIKE Prime and Robot Inventor hubs do have a large number of "extra_files" which is actually just a collection of sounds. Here's a list of them all: 1234 Exterminate Kick 'Seek and Destroy' Activate Fire Laser Shake Affirmative Goal Laugh Shooting Bowling Goodbye Like 'Shut Down' 'Brick Eating' Grab 'Mission Accomplished' 'Slam Dunk' Celebrate Hammer No Strike Chuckle Hello Ouch 'Success Chime' Countdown Hi Ping Tadaa 'Countdown Tick' 'Hi 5' Play 'Target Acquired' Damage Hit Punch 'Target Destroyed' Deactivate Horn Reverse Whirl Delivery Humming Revving Wow Dizzy 'Hydraulics Down' Sad Yes Error 'Hydraulics Up' Scanning Yipee Explosion Initialize Scared Yuck
  7. I've now got almost every firmware. I have: 1.0.0 1.1.4 1.2.0 1.2.1 1.3.0 1.3.1 The webpage for the installer also lists: 1.1.0 1.1.1 Which I don't have yet. If anyone has them let me know!
  8. Thanks for the link, I've ripped the firmware and filesystem out of the app and added them to the repo, along with a few other firmwares since my mindstorms set arrived. I'll have a play with the Lego application download URL and see if I can get some other old versions. For reference it's all here: https://github.com/gpdaniels/spike-prime
  9. Sorry to bump a bit of an old topic, but I just noticed this thread. I'm the author of that question and the github repo behind it of old firmwares. Were you successful in finding any old firmwares? I'f love to add them to the github repo. Otherwise if you have any information about the software inside the hubs I'd love to know!