Help with coding up my tinysaber in exchange for an awesome marble track I make.

DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
Hey everyone,

I make marble tracks and I'm using a tinysaber in a new piece of track I am building. I'm embedding it in a piece of track and I want the LEDs to light up sequentially when a marble hits hit (so once the accelerometer senses movement basically).

I'm not so great at programming however, so I have a suggestion for a bit of a trade which will hopefully be a win/win. If someone is up for making the code I will send them a 'pro pack' of the marble track which retails for around $250

Here's my website so you can get a better idea of the marble track I'm offering from my side of the trade: https://deepmake.io/collections/infinity-trax

I've attached a little video of the track with the tinysaber embedded in it so you can see what I'm referring to as well.

I'm hoping someone replies, but on the off chance that more than once person does I will honour the first person to say they will do it.

I look forward to hearing from you, and if you need clarification on anything I've said please just let me know,

Luke



Jason

  • Administrator
  • Hero Member
  • *****
    • Posts: 107
  • TinyCircuits Employee
    • View Profile
Attached is a sketch that will light the LEDS from the base to the top in sequence with 50ms between iterating. After all LEDS are lit, waits 0.5s and turns them back off. LEDS stay lit as the chain progresses.

I hand tweaked the threshold at which the accelerometer needs to move/be jolted before playing the animation. The threshold could potentially need to be lower or higher for each unique piece of hardware. The threshold is low enough now that it sometimes plays the animation as I type on my keyboard.

I removed all other functionally that a typical TinySaber has. Touch does not do anything right now.

Let me know what you think! I'm sure there is plenty of tweaking that needs to be done.


DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
This is awesome! Thanks so much!!  It's super late here right now but will upload and test the sketch tomorrow. If there's any tweaks I'll let you know and look forward to seeing it in action. So exiting!! If you pm me your address for the marble track that'd be great.



 

SMF spam blocked by CleanTalk