User Manual - mrstefangrimm/Parc GitHub Wiki

This manual will you get started with your Parc remote control. As you will see, it is easy and you have all the tools you need.

Prerequisites

  • A Parc remote control and the firmware installed
  • A Serial terminal emulator
  • A MicroUSB cable

You obviously need a Parc device with the installed firmware. Find out more on instructable.com. Further you need a terminal emulator to communicate resp. program the device. The Arduino IDE comes with a terminal which they call "Serial Monitor". That is all you need. Of course you will need a USB cable.

Technical Specifications

  • 5 Function buttons and 4 modes and by that 20 programable keys

  • Battery that last approximately 36 hours

  • 4-bit PIN (personal identification number)

Functions

The device has five function buttons (A - E) and two mode switches (M1, M0). The PIN switches are covered later in this document as the PIN is an optional feature.

Modes 0, 1, 2, 3 multiplied with buttons A, B, C, D, E makes a total of twenty functions. You'll see it's not difficult to remember the button functions if you give each mode a certain meaning. Mode 3 is my media mode and uses Bluetooth:

Mode 3 Bluetooth commands for buttons A - E
A: Play/pause (PLAYPAUSE)
B: Next (MEDIANEXT)
C: Volume Up (VOLUME+)
D: Volume Down (VOLUME-)
E: Mute (MUTE)

This works with most media players. With youtube, all buttons work except MEDIANEXT which has no effect. With the Soundcloud App, if you know this, it works. Please have a look at the Adafruit FAQ for more details. Or just try the various Bluetooth control keys (search for BLEHIDCONTROLKEY on the Adafruit website for the full list) and see if they work. Some more examples? HOME presses the Home button on a Smartphone and CALCULATOR opens the calculator on a Windows PC.

Status Lights

Charging Light

A orange light left of the USB connector. If the battery is fully charged it is off.

Warning Light

If it is permanently on, the memory is low. This results in a malfunction of the device. You have to re-write or skip some of your programs. As the programs are on the heap, the program for mode 3 and button E is affected first.

Wrong PIN...

Bluetooth Light

A blue light on the front of the device. It is on when the device is connected to another device.

Serial Ports

USB Port

The USB port acts as a HID (Human Interaction Device) device when a program is executed. When connected to a PC, a Smartphone or Tablet, the Parc device is recognized as keyboard.

The USB port is also used to program the device. To do that, open the associated COM port with a terminal emulator (The Serial Monitor in the Arduino IDE).

Debugging Port

The Debugging port is writes debugging information to a second COM port. Debugging is disabled by default. The software uses the Arduino SoftwareSerial library.

Reset Button

Programming

At the end of this section is a list with examples. You may want to have a look at the Programming Guide too. To program the Parc remote control, you connect the device with an USB cable to the PC and connect with a Terminal emulator to the COM port.

To write your first program, type in: { 0 A: UT "hello world"; }. Open the notepad text editor and press the "A" key on the Parc remote control with both mode switches in zero position; voilà. Not yet impressed? How about a program that opens the text editor first? Try: { 0 A: UK <Win>; W 1000; UT notepad; W 2000; UK <Enter>; W 1000; UT "hello world"; } .

To modify a program, just write a new one and the old one is replaced. Lets say for mode/button 0/C you wrote: { 0 C: UT "hello wordl"; }. Fix it by writing: { 0 C: UT "hello world"; }.

To delete a program, write a program without a program step ({ 0 C: }).

The maximal possible length of a command is 30 characters. This is the longest possible command: { 0 C: UT "1234567890123456789012345"; }, You can always increase the number in the program source code, but the memory is limited and you should avoid long text commands if possible.

Typing in a program in a Terminal emulator is cumbersome. Instead, you can write the programs in a text editor and copy-paste the code to the Terminal.

Strategy to persist your programs

The programs on the Parc remote control contain passwords (mine do). On the device, the programs are in the volatile memory. But a plain text file on the PC with all the programs and passwords is not a good idea. Here is my trick: Mange the programs in a password manager. The entries in a password manager usually have field for free text.

Strategy to Save Memory

The text command UTand BT use most memory. Here is a trick to save memory: Use batch files and minimize the search strings.

Example: The program opens instructables.com and signs in. A batch file in the folder C:\Parc\ opens the web browser and navigates to the web site:

C:\Parc\instructables.bat
start https://www.instructables.com/account/login/

Open instructables.com in the Dull program looks like this:

{ 0 C: ...; UK <Win>; W 1000; UT c:\parc\i; W 1000; UK <Enter>; W 8000; ...

The program presses the <Win> button, waits 1 second and then types in c:\parc\i. This is already sufficient to localized instructables.bat. Then the program waits 1 second, presses Enter and waits another 8 seconds for the website to open. c:\parc\i uses only 9 bytes.

Foreign Keyboards

I am using a foreign keyboard on my Windows PC and the Parc device assumes it is an US-English keyboard. It can be mind-twisting to figure out what keycode to send to get a correct text string. Here is my simple trick: In my programs, I switch the keyboard to by a US keyboard at be begin and switch it back at the end.

{ 0 C: UK -r2 <Win> <Space>; ... UK <Win> <Space>; }

<Win> <Space> changes the keyboard. with the "-r" modifier, -r2 <Win><Space>, it is pressed twice. That is just an example how to use the command.

Example programs

I removed my personal data, otherwise this is how my Parc remote control is currently programmed:

Name Mode / Button Program
Home USB 0 / A { 0 A: UK <Ctrl>; W 2000; UT password; W 1000; UK <Win> <Space>; UK <Enter>; }
0 / B { 0 B: UK <Win> 'l'; }
Home BLE 1 / A { 1 A: BK <Ctrl>; W 2000; BT password; W 1000; BK <Win> <Space>; BK <Enter>; }
1 / B { 1 B: BK <Win> 0xF; }
1 / C { 1 C: BK -r2 <Win> <Space>; W 1000; BK <Win>; W 1000; BT pwd-mgr; W 2000; BK <Enter>; W 5000; BT password; BK -r6 <Tab>; W 1000; BK <Enter>; BK <Win> <Space>; }
1 / D { 1 D: BK -r2 <Win> <Space>; BK <Win>; W 1000; BT c:\parc\z; W 1000; BK <Enter>; W 8000; BK -r4 <Tab>; BT loginname; W 1000; BK <Tab>; BT password; BK <Win> <Space>; }
Work 2 / A { 2 A: UK <Ctrl>; W 5000; UT password; W 1000: UT <Enter>; W 10000; UK <Win> <Space>; }
2 / B { 2 B: UK <Win> 'l'; }
2 / C { 2 C: UK <Win>; W 1000; UT time-mgmt-tool; W 2000; UK <Enter>; W 5000; UT login-name; UK <Tab>; UT password; UK <Tab>; W 5000; UK <Enter>; }
2 / D { 2 D: UK <Win>; W 1000; UT "Work Tasks Website"; W 1000; UK <Enter>; }
2 / E { 2 E: UK <Win>; W 1000; UT VPN-Client; W 1000; UK <Enter>; W 1000; UK <Win>; W 1000; UT "Key Gen"; W 1000; UK <Enter>; UK <Tab>; UK <Space>; }
Media 3 / A { 3 A: BC PlayPause; }
3 / B { 3 B: BC MediaNext; }
3 / C { 3 C: BC Volume+; }
3 / D { 3 D: BC Volume-; }
3 / E { 3 E: BC Mute 1000; }

Security

Two security measures are in place:

  1. A four-bit pin. If the user presses a button and the wrong pin is set the device becomes unusable after 3 retries. You have to reset the device and reprogram it.
  2. The programs are in volatile memory only. After approximately 36 hours the battery is empty and the programs deleted.
PIN

The PIN is optional. Once you have set a PIN it is no longer optional. I recommend to use a PIN if some of your programs contain passwords.

When used with a wrong PIN the device becomes unusable. It is not possible to unlock the device after that. A hardware reset is required and this deletes all the programs and the current PIN.

Here is how you set a PIN: { P N: 1 0 0 1 2; }. The last number ("2") is the number of retries before the device locks.

If a PIN is set and the 4 slide switches are set to zero, keypresses are ignored. By that you do not accidentally start programs (like the lock function of a Smartphone that prevents from dialing a number).

The protection is not very strong. But the chances are good that if someone takes your Parc remote control and presses on buttons a couple of times, the device is locked and by that becomes unusable.

⚠️ **GitHub.com Fallback** ⚠️