Skip: Difference between revisions

From RevSpace
Jump to navigation Jump to search
(Add headers, protocol description)
m (Lijstje)
 
(8 intermediate revisions by one other user not shown)
Line 5: Line 5:
   |Picture=SkipGuts.jpg
   |Picture=SkipGuts.jpg
}}
}}
{{Skipknoppenlijstje}}


= Skip =
= Skip =
Skip annoying music with the skip button.
Skip annoying music with the skip button.
== Status ==
Status (most recent first):
* 2017-07-28([[bertrik]]): replaced the physical button by an elevator button, the button does not fit really that well in the case but does seem to work. Wireless transmission seems to work fine too, pressing the button gives several 534B4950 messages over the serial output. We can't figure out which script is supposed to listen to this message and perform the actual skip action towards the media player.
* 2017-06-18 ([[bertrik]]): Skip is currently not operational. It appears the button itself is a bit flaky, the contact is not super reliable. I cloned the git repo and made some changes such that at least it compiles without tricks (put the .ino in a directory of the same name to satisfy Arduino IDE, applied consistent indenting). I cannot reproduce the problem on the receiver side where at some point it stops receiving SKIPs, but it does often receive multiple SKIPs (but that appears intentional). I used the [https://github.com/gcopeland/RF24 gcopeland fork of the RF24 library].
Next steps:
* Connect the receiver up to the Linux box thing again


== Operation ==
== Operation ==
Line 30: Line 40:
* automatic ACK is disabled
* automatic ACK is disabled
* dynamic playload size is enabled
* dynamic playload size is enabled
* frequency/channel?
* channel 76 (RF24 library default)
* datarate 1 mbps (RF24 library default)
* 16-bit CRC on (RF24 library default)


Each message is sent several times in rapid succession, so the receiver should be prepared to handle duplicates.
Each message is sent several times in rapid succession, so the receiver should be prepared to handle duplicates.


The message sent is structured as follows:
The message sent is structured as follows:
* first byte contains the length of the rest of the message
* first byte contains the length of the rest of the message (not including this byte), 4 in the case of the "SKIP" message
* next four bytes contain the type of message in uppercase ASCII (not 0-terminated), for example "SKIP"
* next four bytes contain the type of message in uppercase ASCII (not 0-terminated), for example "SKIP"
* rest of the bytes are message-specific, no data in case of the "SKIP" message
* rest of the bytes are message-specific, no data in case of the "SKIP" message

Latest revision as of 16:48, 9 February 2020

Project Skip
SkipGuts.jpg
Status Completed
Contact Juerd
Last Update 2020-02-09
Zie ook:
Uitvoering Skip Wifiskip EspNowSkip Skipknop
Gemaakt 2013 2015 2018/2019 2020
Status Verouderd Onbekend In gebruik In gebruik

Skip

Skip annoying music with the skip button.

Status

Status (most recent first):

  • 2017-07-28(bertrik): replaced the physical button by an elevator button, the button does not fit really that well in the case but does seem to work. Wireless transmission seems to work fine too, pressing the button gives several 534B4950 messages over the serial output. We can't figure out which script is supposed to listen to this message and perform the actual skip action towards the media player.
  • 2017-06-18 (bertrik): Skip is currently not operational. It appears the button itself is a bit flaky, the contact is not super reliable. I cloned the git repo and made some changes such that at least it compiles without tricks (put the .ino in a directory of the same name to satisfy Arduino IDE, applied consistent indenting). I cannot reproduce the problem on the receiver side where at some point it stops receiving SKIPs, but it does often receive multiple SKIPs (but that appears intentional). I used the gcopeland fork of the RF24 library.

Next steps:

  • Connect the receiver up to the Linux box thing again

Operation

press
skip
press and hold (2 seconds)
stop
press and shake (2 seconds)
replace playlist with random shuffle play

Inspired by Bitlair's skip button project, but with major differences:

  • 2,4 GHz instead of 433 MHz, because nRF24L01+ modules are so easy to use :-)
  • Capacitor instead of transistor logic to keep the arduino running long enough.
  • For now, just a button for skipping, no volume control.
  • Optiboot boot loader instead of a custom one.
  • Uglier case, uglier button.

Software

Protocol

We use the following settings for the nRF24L01+ module:

  • every device uses the same address, which is 0x0066996699ULL
  • automatic ACK is disabled
  • dynamic playload size is enabled
  • channel 76 (RF24 library default)
  • datarate 1 mbps (RF24 library default)
  • 16-bit CRC on (RF24 library default)

Each message is sent several times in rapid succession, so the receiver should be prepared to handle duplicates.

The message sent is structured as follows:

  • first byte contains the length of the rest of the message (not including this byte), 4 in the case of the "SKIP" message
  • next four bytes contain the type of message in uppercase ASCII (not 0-terminated), for example "SKIP"
  • rest of the bytes are message-specific, no data in case of the "SKIP" message

Updates

See also the README files in the Git repositories.

  • Version 1.0 by Juerd: Coconut juice container with small button.
    • Reinforced with hot glue and duct tape
  • Version 1.1 by Juerd and others: Coconut juice container with big red button.
    • Repaired and reinforced with lots more hot glue and duct taped
    • Broke anyway, after a year of abuse, during a demo of how well the biodegradable coconut juice box held up.
  • Version 1.2 by Juerd: Blue plastic parts bin, industrial big red button
    • Broke after a few months of abuse, during a demo of how strong the new button box was...
  • Version 1.3 by morphje: Sturdy case, industrial big red button
    • This one's really rugged and will never break! Famous last words...

Suggested changes for those who feel like hacking on this:

  • Bare atmega instead of complete arduino
  • Better case
  • Better button
  • More buttons
    • Volume control
    • Play/pause

Skip 2.0 (planned)

Since the biodegradable case has started crumbling around the button, I (Semafoor) ordered a new button that should enable some additional functionality (volume, previous song) and made a plan for a steel case with some workaround to keep functionality of the nRF module. More info when the button arrives

  • (30-7) the button has arrived(>^_^<).

The basic idea is to construct a pyramid with the joystick sticking out of the bottom. The triangular sides will be what Skip2 wits on. As all four triangular sides will be identical, Skip2 will not have an obvious top or bottom. By using the accelerometer to detect the graviational field of the earth, Skip2 will be able to tell which way is up and down, and can thus interpret the joystick movements. These should be as follows

click hold
up volume up unmute
down volume down Mute
left previous song stop
right next song random/shuffle

Because of the accelerometer, this list is always true, regardless of which side is actually facing down. Although skip2 won't likely be easy to hold in one hand, the shake=shuffle function will be preserved.


Joystick skip 2.jpg

A laser cut MDF mockup is made to get a feel for the right dimensions and to check whether enough space is available for all the parts. These dimensions (10 by 12 cm triangles) are probably a bit tight. As all the parts will work on a reduced voltage (3-3.6 V battery) this size may suffice, otherwise the pyramid may need to be a little longer in the final version.

Skip 2.0 Mockup.jpg

Power supply requirements for different components:

Component Supply voltage range (V)
Arduino Pro Mini 1.8-5.5
nRF24L01 1.9 - 3.6 (on chip regulator
Acceleration sensor (MMA7361) 2.2-3.6