Communication between MS Metro and an Arduino board? - microsoft-metro

I've received a project from someone that includes an Arduino (Uno) board with some sensors and lights with an USB cable and a documented protocol for communicating with this board through a COM port. It works fine with some existing code, but I need to port the whole project to a Windows RT environment using an ARM processor and including the Metro interface for the application. And it's going to be completely rewritten...
First of all, my Windows RT device does have an USB port so it can connect to the board. But the challenge is to communicate with the board to read out the sensors and manipulate the lights and I happen to have problems finding some useful libraries, tutorials or other information about how to make these work together.
This project works fine with other Windows versions, though. I just need something specific for Windows RT/ARM/Metro.

Currently it is not possible to do this on Windows RT, and here is an explanation why. As a work around I am using a standard full screen WPF application in combination with the Surface SDK for touch enable UI components. The obvious disadvantage here is that you cannot publish the app to the store.

I think that we should actually try it on a real machine instead of the rt. The surface rt is basically for documents and the internet.
You'd be better off trying all of this with a Toshiba 2032.
A PDA from about 2003.

Related

Flutter and Iot devices

I am currently building an app that controls a single actuator and a LED strip. The controller for the actuator and LED strip is based on an ESP32.
On the ESP32 I have used the <ESPAsyncWebServer.h>, <ESPAsyncWiFiManager.h> to set up and connect the ESP to the local wireless network. In the app I would like to send some commands to the ESP like http://<ESP32_IP>/led_set?level=<level> and
http://<ESP32_IP>/act_open and so on, this shouldn't be an issue.
Normally I would set up mDNS on the ESP and in the Flutter app, however several of the ESP controllers are already shipped to the customers. So I am looking for another way to identify the ESP.
At the moment I have used the ping_discover_network library and the ESP shows up fine on port 80. I am however not able to separate the ESP from the other devices that shows up on port 80.
Do any of you have any suggestions?
Thank you in advance
You don't have many good options. If you only want to identify a few devices which have slipped through your fingers without mDNS, you can use their MAC address as a filter. If you happen to know their individual MAC addresses, then that should be quite painless. Otherwise you'd have to look for devices with MAC OUI (first 3 bytes, usually) ranges allocated to Espressif. Espressif has several OUI ranges, but if your devices were from a single batch of ESP32 module of the same type, they'll be using the same OUI so it should be quite easy to figure out.
E.g. a batch of modules I have all start with 40:F5:20:...
Of course, if a third party installs their (unrelated) ESP32 module into the same network, you'll have a chance of identifying those as well, but such is life.
This is obviously a stop-gap measure. Make sure further devices go out of door with some identification (mDNS or otherwise).

HoloLens sharing with UWP application for PC

The idea is to create a HoloLens application that displays a hologram which can then be manipulated through the UWP application run on the desktop. The desktop application would contain various UI elements that manipulate the hologram(ie. a rotation button to turn it 45 degrees) and of course, see the same object as in the HoloLens. Naturally, I arrived at the 240 academy tutorial, but that seems a bit outdated compared to the current version of the Holotoolkit. It also doesn’t really fit my scenario, since I am not sharing between two HoloLens devices, but a desktop and a HoloLens. I figured that that shouldn’t really matter since you are still targeting for the UWP, but I wasn’t sure.
So what I tried so far was trying to edit the example scene “SharingSpawnTest” and target it for the PC to see what would happen, but I thought this wasn’t the way to do it since the project settings are set for Mixed Reality and not a regular UWP application for the desktop.
My question is basically if this is even possible and if so, how do I achieve this? Do I have to create two separate projects, one for the desktop and one specifically for the HoloLens and communicate that way?
Add a NetworkManagerHUD component to your NetworkManager object. Once you add it, type in the HoloLens IP address and connect to it. Currently, this only works for HoloLens to be the host and the desktop to be the client.

Controling Pc Mouse from Gryoscope/Accelormeter

I have build an IMU consisting of an Accelerometer and Gyroscope that can provide 6DOF motion output results to pc. I use a serial COM port over USB interface to get data on pc and i can see the data through Hyper terminal.
Now what i want to do is control my mouse pointer with that data for demonstration purposes. I initially looked at GlovePIe application but it doesn't support serial com ports. So it would be great if anybody could advice or direct me to a possible solution.
I am doing something similar, controlling pc mouse with android phone. But I am using Bluetooth and the touchscreen as input. You can look into win32 api functions for controlling com port.
You can also you sockets to send coords over tcp/ip. Setting up Bluetooth/Sockets is fairly easy once you understand the api calls. Let me know if you need more assistance.
use C++ code to controll the pointer location. SetCursorpos(x,y).Enjoy

WIA can not find my internal camera in windows 7

I am currently working on a project where I need to access a build in camera (software will run on a tablet), stream what the camera is showing, and allow the user to take a picture from the stream. I have a version of what I am trying to accomplish on my laptop with its built in camera working. The major difference is the Laptop is using windows XP the tablet is using windows 7.
Running the software on the tablet I get an exception (with some research it appears that exception is cause by no WIA device found). Is it possible that the built in Camera is not WIA compatible? The device does show in the Device Manager as an USB Camera Device, but unlike the camera on my laptop I can't access it directly. I have to use 3rd party software put in by the tablet maker to get the camera to work.
Has anyone experience similar problems? I have to believe if the tablet maker can do what I need I should be able to do something similar.
There also is the Windows Portable Device API that can access cameras, but that appears to be written in c++, without a .NET wrapper. Does anyone know of a simple tutorial of how I could get .NET to place nice with it? EDIT: Just tried WPD didn't list any devices either. I am beginning to thing this camera doesn't exist.
Any knowledge/ pointers to resources would be appreciated. (So far google has turned up the same few articles, no matter which way I approach the problem)
Turns out my Camera was not WIA compatible. I was able to get the tablet to do what I needed it to do using directshow (actually directshow.net)
Good links if others are trying to do something similar and having similar problems
http://msdn.microsoft.com/en-us/library/dd375454%28VS.85%29.aspx
http://directshownet.sourceforge.net/faq.html

Wireless communication: AVR based embedded system and iPhone

What is the best way to realize wireless communication between an embedded system (based on an AVR controller) and the iPhone? I think there are only two options: either WiFi or BlueTooth. The range is not really a problem, since both devices should stay in the same room.
I have no idea, if there are any useful WiFi boards that can be connected to an AVR based microcontroller system (or any small microcontroller), any hints would be highly welcome.
I guess the better solution would be BlueTooth, but there is also the problem: which BlueTooth board is best suited for attachment to an AVR system, and is it possible to use the iPhone BlueTooth stack for (serial) communication over BlueTooth with the AVR device.
I hope that somebody already realized such a system and can give some helpful tips...
You can get modules for both WiFi and Bluetooth that will connect to an embedded system through a UART interface, however a WiFi module will have far more processing power than your AVR microcontroller, often with spare capacity and I/O to execute additional user code, so connecting one to an AVR maybe somewhat redundant in many cases.
Bluetooth modules are simpler, less expensive, and the data-rate is better matched to the AVR's capabilities. For example these Parani modules. I have used them between an embedded system and a Laptop PC's Bluetooth, so given appropriate communications software, there is no technical reason why it could not be used with an iPhone I think. However this may be the flaw, on the PC the device was recognised as a virtual serial port, I don't know whether iPhone supports 'legacy' communications in quite the same way.
For comparison, a WiFi solution
From what I know, BlueTooth is very limited on the iPhone: There is only very few BlueTooth-Profiles implemented, and - even if they can be extended with a jailbroken iPhone - I doubt this is easy to use from the application layer.
On the other side, transferring via WiFi requires a lot of processing power and memory since much more things have to be implemented before you can even start transferring data: 802.11, cdma/ca, arp, tcp. That's a big task.
Is it an option to build a hardware extension to the iPhone ? You might be able to get the serial connection and power out of the dock connector. Then even ZigBee could be very helpful.
Here's an article you might find helpful. I would lean toward a WiFi solution just because of the added flexibility available.
http://www.embedded.com/design/networking/215801088
-t
Some of the other people at the office have done AVR <- Bluetooth -> Symbian and AVR <- Bluetooth -> PC solutions without trouble. There is lots of info, reference designs and source available. I have no idea of how hard it would be to use Bluetooth on Iphone.
The exact module is probability also not important as long as it got some type of serial interface (I2C,SPI) to interface to the AVR and some source code show how to use the module.
Is it an 8-bit or 32-bit AVR? For the AVR32 processors there's support
for WiFi in the Atmel 1.5.0 Software Framework using SD-card-mounted
WiFi modules from HD Wireless (http://www.hd-wireless.se), including
an IP stack (lwIP). Be aware that you need Ad-Hoc (IBSS) support to
connect directly to the iPhone.
There is WiSnap kit. It can connect directly to a standard RS232 interface or through the TTL UART interface to embedded processors. We are planning to use it in our project. It also has Ad-Hoc support.
There are some usage examples and an iPhone application for connection setup.
http://serialio.com/products/mobile/wifi/WiSnapKit1.php
What are you trying to communicate between your AVR and the Iphone? The Iphone is made for the web along with everything apple (which AVR's are decidedly not). So what works well is an embedded device that exposes a web-interface. Like the Transmission bittorrent client on Linux. Also nowadays many low-power small form-factor linux platforms exist that will allow you to do this.
For instance Gumstix has an ARM based platform that runs linux and includes WiFi (Overo Fire).