Author Topic: Wireless pc media remote for VLC (using nrf24l01 and rotary encoder)  (Read 4650 times)

flax2000

  • Newbie
  • *
  • Posts: 5
Hello this is my first post here so i hope its all working.
this is a project i have been working on for a while i originally made it for atmega328 pro mini, but i have converted it to digi to get a smaller unit.
I got the nrf working on digi with a modified library from: elecfreaks (best nrf library i have found so far).
Look in the nrf24l01 file for the pin assignment you can change these around to any pins.
i have connected the rotary encoder to pin 0 and 2, on pin 2 i have it connected throu a 1k resistor
and the rotary switch connected directly to pin 2, middle pin on rotary and other switch pin to gnd.
this way i can read the switch with analogRead
Remember the nrf needs 3.3v and a capacitor don't use too small or it will not work very well.

as it is now the code have:
pause/start
forward/reverse
volume up/down
hold the switch down for a moment and release and you can change volume
press fast pause/start
<<>> on rotary forward reverse or volume-+

the code are still a bit messy so its as it is

i almost forgot you have to add:
#define KEY_ARROW_RIGHT 0x4F

#define KEY_ARROW_UP 0x51
#define KEY_ARROW_DOWN 0x52

in DigiKeyboard.h


Here are the files:(i hope)
https://www.dropbox.com/s/4afch3hvf1uo1km/rotary_RX_NY_v_usb_digi.rar
https://www.dropbox.com/s/gzhbuh3n6p6miub/rotary_TX_NY_2014_digi_AllOk.rar


here is what my old setup looks like. the new with digi will be smaller and hopefully better looking
https://www.dropbox.com/s/pova9kzazxteb4p/IMG_1448.JPG
« Last Edit: February 27, 2014, 01:31:41 am by flax2000 »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Wireless pc media remote for VLC (using nrf24l01 and rotary encoder)
« Reply #1 on: March 01, 2014, 01:51:23 am »
Very cool! Thanks for sharing it!

This might be of interest too: http://digistump.com/board/index.php/topic,1319.0.html

flax2000

  • Newbie
  • *
  • Posts: 5
Re: Wireless pc media remote for VLC (using nrf24l01 and rotary encoder)
« Reply #2 on: March 01, 2014, 07:59:37 am »
nice, i will give it a try and see if i can convert this the same way. Thx for the tip.