Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 25-03-2020, 02:31   #1
Registered User

Join Date: Mar 2020
Posts: 2
CTRL M on hardwired button

Hi guys.

I have Opencnpn on a rapberry pi and would like to have a hardwired button outside for marking where i put my fishing pods and lines.


Then i could with a push of a button put a mark and move on to the next dropsite witout going inside to mark each place.

Any thought on this?
__________________

Thoma_s is offline   Reply With Quote
Old 25-03-2020, 04:51   #2
Senior Cruiser
 
GordMay's Avatar

Cruisers Forum Supporter

Join Date: Mar 2003
Location: Thunder Bay, Ontario - 48-29N x 89-20W
Boat: (Cruiser Living On Dirt)
Posts: 38,198
Images: 241
Re: CTRL M on hardwired button

Greetings and welcome aboard the CF, Thom S.
__________________

__________________
Gord May
"If you didn't have the time or money to do it right in the first place, when will you get the time/$ to fix it?"



GordMay is offline   Reply With Quote
Old 25-03-2020, 05:59   #3
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,792
Re: CTRL M on hardwired button

Thoma s...
There are several possibilities.
  1. Connect a wire less keyboard to bring outside.
  2. Connect a wire less Logitech Trackball mouse to bring outside and set one of the extra buttons to send Ctrl-O. I suppose you meant this to set a mark at the boat position? and/or the other button to send Ctrl-M > mark at pointer position.
  3. Since you've a RPi you could connect a push button wired to a GPIO (+ COM) pin and make a Python program to emulate a Ctrl-O key stroke when the GPIO pin has been low.
Hakan is online now   Reply With Quote
Old 25-03-2020, 07:17   #4
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 2,995
Re: CTRL M on hardwired button

Following on Hakan's #3, which will be the most difficult to implement but the most user friendly to use with hands full of fishing gear....

Setting up a GPIO-Button “keyboard” on a Raspberry Pi – Subjektive Wahrnehmung

I've implemented something similar in other Pi projects, but never with O. Note that, depending on environment, the keypress will be received by the active application, if O is not active the press may go someplace else. And if the OS uses the keystroke (e.g. Alt-Tab in Windows) then it becomes yet more complicated.
Dsanduril is online now   Reply With Quote
Old 25-03-2020, 10:04   #5
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,792
Re: CTRL M on hardwired button

Or...

Catch a swordfish and point the space bar. (Sorry ...tired)
But actually it's easy to convince O to use the space instead of Ctrl-O. And the space is easier to reach?
Hakan is online now   Reply With Quote
Old 25-03-2020, 10:57   #6
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,792
Re: CTRL M on hardwired button

Thoma s..
If you don't like programming and stuff the most simple is to connect an old (small?) keyboard and take it out. Wrap plastic around it and nail it on a wall. Tell O to use the space to do the same thing as Ctrl-O. Even wearing big gloves you can hit the space.

To use the space for to drop a mark at boat position add this to the config file:
[Settings]
Ö
SpaceDropMark=1


Wiki, how to:

https://opencpn.org/wiki/dokuwiki/do...ortcuts#cursor
Hakan is online now   Reply With Quote
Old 25-03-2020, 12:54   #7
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 444
Re: CTRL M on hardwired button

A robust ready to use button like this https://www.compuphase.com/usbkey/usbbutton_en.htm
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 25-03-2020, 13:02   #8
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,792
Re: CTRL M on hardwired button

Nice button, really. Would fit
Hakan is online now   Reply With Quote
Old 25-03-2020, 13:25   #9
Moo
Registered User

Join Date: Mar 2017
Posts: 644
Re: CTRL M on hardwired button

It is all in openplotter already. Just connect a button to a GPIO pin and configure. I did this on one of my plotter builds for a MOB button, marks and and alarm acknowledge. Otherwise if you don't use openplotter a python (or similar) script will be required.
Moo is online now   Reply With Quote
Old 25-03-2020, 13:45   #10
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 2,995
Re: CTRL M on hardwired button

Quote:
Originally Posted by rooiedirk View Post
A robust ready to use button like this https://www.compuphase.com/usbkey/usbbutton_en.htm

Now that is a cool solution. I want one. Or two.

Only caveat is that at least by specification the longest you can make a USB connection is 5m/16', pretty easy to go well beyond that even on a small boat if you don't plan cable routing properly. I'm guessing with a single value you might be able to exceed the specs, but worth thinking about.

I still want one.
Dsanduril is online now   Reply With Quote
Old 25-03-2020, 15:09   #11
Moo
Registered User

Join Date: Mar 2017
Posts: 644
Re: CTRL M on hardwired button

Quote:
Originally Posted by Dsanduril View Post

Now that is a cool solution. I want one. Or two.

Only caveat is that at least by specification the longest you can make a USB connection is 5m/16', pretty easy to go well beyond that even on a small boat if you don't plan cable routing properly. I'm guessing with a single value you might be able to exceed the specs, but worth thinking about.

I still want one.
Use an active usb cable and you are good for just about any distance on your average cruising boat.
Moo is online now   Reply With Quote
Old 25-03-2020, 15:41   #12
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 2,792
Re: CTRL M on hardwired button

There's a wire less button on the same site as well
Hakan is online now   Reply With Quote
Old 27-03-2020, 11:25   #13
Registered User

Join Date: Mar 2020
Posts: 2
Re: CTRL M on hardwired button

Thanks

Lots of great tips.

And yes it was Ctrl O and not M

Now I can make a nice button solutions outside.
__________________

Thoma_s is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind Speed Transducer - Wireless or Hardwired? SF Bay Dude Marine Electronics 22 06-12-2019 14:41
Starter Button on Yanmar Gauge Cluster Jack Long Engines and Propulsion Systems 17 04-03-2018 19:38
For Sale: Westerbeke 40, transmission, alternator, ctrl panel mackrobertson Classifieds Archive 2 16-05-2015 12:50
Does anyone mind loosing Ctrl-Z zoom? JesperWe OpenCPN 11 09-08-2012 06:40
Ctrl + M = Drop Marker at Current GPS Position Algarve OpenCPN 1 05-02-2012 00:40

Advertise Here


All times are GMT -7. The time now is 22:48.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.