Emulating multi touch with mouse HID Bluetooth? - raspberry-pi

I’m planning the system that could analyze touch information from my car LCD display and using Raspberry PI change it to standard mouse movements using Bluetooth HID protocol. I’m wondering if it is possible to emulate multi touch thru mouse HID over Bluetooth?

Yes, Its possible. You need something like HC-06 with HID firmware on it.
The Tricky part is to read the cars touchscreen output...

Related

Detecting if an external mouse is connected in Swift?

For an app I am making on macOS I want different behaviour for the trackpad vs. a mouse. Is there any way to check if an external mouse is connected (e.g via usb or bluetooth) to the mac in Swift? I.e the assumption will be that if an external mouse is connected then the user will be using that rather than the trackpad. If they have an external mouse connected but would like to use the trackpad as as a pointer then they can change this in a settings menu.

Raspberry Pi Node-RED Touch input

I have a smart home (node-red) with a Raspberry Pi and a official 7" touchscreen as dashboard.
I now want to turn off the backlight after a certain time and I know how to do that. I also want to turn it back on if I touch the screen at any place.
I have no idea how to do that, as there is no node-red node for touch input or something like that.
Anyone did this before?

Detecting when device in cardboard headset in Unity

I'm building a Unity Cardboard app, and would like to detect when the device is in the headset. The NFC in theory has this data, but it does not seem to be exposed in the API. I would like to have the app automatically enter VR mode when in the headset, without the user needing to toggle in and out of a VR mode.
Basically, I want Cardboard.vrModeEnabled to be automatically updated when you enter or exit a headset.
Is this possible? Thanks!
It used to be in the (non-Unity) SDK but was deprecated, for several reasons. For one, the NFC sensors on phones are placed in different places, so the detection was not uniformly reliable. For another, using the sensor this way drains battery quickly.
There are a lot of cardboard models on the market. a lot of them don't come with an NFC tag. so i wouldn't count on it.
Best approach for me is to start in VR mode, when the user touches the screen, disable VR mode for 10 seconds since the last touch and then go back to VR mode.

Use USB keyboard for text input in Smart TV application

My application has implemented custom onscreen-keyboard.
Is there a way to support the USB keyboard connected to a TV? By default, Samsung TV translates some keystrokes to remote control codes (0-9, red, blue, etc..). Is there a way to get all keystrokes? Preferably without the use of IME.
UPDATE:
I want to implement text input from the USB keyboard within my own onscreen virtual keyboard. By default, letter keys are not translated to application.
TV: UE46ES8000, USB, and BT keyboards connected and allow to control application, but unable to input text in it.
You can connect keybords to your SmartTV but your TV need to support them.
In example this samsung keybord: http://www.samsung.com/uk/consumer/tv-audio-video/television/tv-accessories/VG-KBD1500/XU-spec?subsubtype=wireless-keyboard
is compatible with:
Samsung SMART TV: LED ES6100 series and above, PDP E550 series and above
So if your TV device support USB or wireless keybord you do not need to translate any key codes in your application it will just work.

How to implement an iOS metal detector app?

I want to implement a Metal Detector app which will react to a magnetic field in the phones surroundings.
How do I read the magnetic field readings from the magnetometer on the iPhone? Does anyone have sample code for accessing the magnetometer readings directly?
Thanks!
I would recommend you look at the O'Reilly book called iOS Sensor that is coming out. They have an entire chapter (6) on the magnetometer and a sample app.
iOS Sensor Programming
Apple Sample Code for Reading the Raw Values from the Magnetometer
No. You can't.
UPDATE : there is no metal detecting components in iPhone. However, there is a magnetometer available since iPhone 3GS. The Compass App makes use of the sensor to detect direction. It just reads magnetic North, but not reading magnetic fields surrounding. Therefore, you can't make a metal detector with it.
Physics Fact: Metal does not generate magnetic fields. Magnets do.
p.s. correct me if I am wrong.
There is already an app which does this. Check this and this blog.
This is what the description says,
The app has an adjustable sensitivity and makes an audible sound
signal if the sensitivity reaches a medium level. The phone needs to
be shook once to be calibrated if you intend to use the device again.
The app makes use of the magnetometer on the iPhone to find
interference with the compass to detect metal objects. Just hover the
backside of your mobile, the area under the camera, over the metal and
the app should find the metal and there should be an increase in
sensitivity.
However I am not sure if it is a fake app or it can be really done this way. Try downloading that and check it yourself. It is a free app.