Localhost arduino pincontrol - webserver

I want to make a browser-controlled Arduino, that can control 2 motors. The requrements for this, is that i want to be able to click on a button on the server that the Arduino hostes, and handle that input as if there was a button connected directly on the Arduino. Is that even possible ?
I have looked at the example called TempretureWebPanel(Arduino Tutorial), but that makes no sense to me..
Can someone please tell me where to find a tutorial for this, or even better, give an example of this.
Thanks in advice.

This example shows how to control an Arduino from a PC.
It uses C# on the PC side but you could drive it with any code you want as long as it supports writing to a USB/com port.
http://playground.arduino.cc/Csharp/SerialCommsCSharp#.UzK-F_l_t2c

Related

Interaction XBOX Controller with Simulink Model

I'm working in a project where i have to control a Robot (I have it already as a Simulink Model) with an XBOX Controller.
Until now I couldn't find a good Example or a good Idea to let these two interact.
I want to change some variables (INPUTs) with the buttons of the XBOX Controller and then get a feedback (Example: a vibration feedback) (OUTPUT).
Is it possible to do that with ROS and Simulink ? So that i can work with ros_joy, and then implement it in my Simulink model ?
It'll be very helpful when i get some advises here.
Thanks a lot.
I can't test this, but I know from ubuntu <= 16 that jstest and jstest-gtk (the nicer gui interface) can be installed via apt, to check & configure any joysticks/gamepads, and it works well. Then you will have your gamepad as a device under /dev/. (Ex: /dev/js0, /dev/input/js0). And that file handle is easy to use, with many supporting 3rd party/one-off libraries (you don't have to use all of ros if you don't want/need to).
And I know from matlab that there are ways to hack up a solution, but their own 1st party solution is vrjoystick, which takes in a 1-based numeric id. This should mean your gamepad shows up as js0, and the id should then be 1: id = 1; joy = vrjoystick(id,'forcefeedback');.

Is it possible to send HTTP GET Requests from a Simulink Block?

basically the title says it all. I'm working on a model that needs (there is no way around it) to load data from a website, parse it and pass it onto another block. I thought I could use an S-Function written in C++, which didn't properly work, then I tried to use webread()
which also didn't work in Simulink because I can't use extrinsic functions on the device this will run on.
I thought I could work around it by downloading the file externally and then reading it through fscanfbut it turned out that Matlab CODER doesn't support that as well.
After putting 2 1/2 days into this now, I'm asking myself whether it is even possible to do something like an HTTP Request through a Simulink block. That's why I went here to ask that question. Thanks for every answer!
I figured out a way to do it with a C++ S-Function by now.
I also created a GitHub Repo for it. If you're stuck with the same problem as I was, try to take a look at this. I'm pretty sure it will help you.

how to associate the launch of a program with a specific device connection to PC

My first question, so be gentle.. :)
I would like to get a certain PC located program to run (instead of iTunes) every time I connect my iPhone to my PC.
specifically - iTools, which is kind of a substitute for iTunes.
From my research i got that it involves adding/manipulating some registry values (something like "ServicesAutoStartOnConnect") at this location: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows CE Services. When i look there, under Microsoft, there is no Windows CE Services sub folder.
I'm using win7 prof. and as mentioned, the device is my iPhone4 (with iOS6.0.1 on it).
Can anybody give me some organized steps to be taken in order to accomplish this?
Not sure if you are aware of SuperUser.com. It is a site, much like this one, but caters more for the type of question you have asked here. For example, I did a search on 'iphone' + 'connect' + 'itunes' and found some possible helpers - SuperUser Search

printk in driver

I am really new to linux module programming.
I need to some how be able to do some tweak to the ath9k driver in linux.
I finally got the compat wireless source code of ath9k to compile in ubuntu 11.04 and was trying to play around with the code.
I tried using printk to tried to get to see what happen.
First I put printk in the init.c file, the message I printed show up when I use dmesg in the terminal. However, when I tried to use the same printk in another file like rc.c it does not show up at all.
I am wondering why is that?
And is there some other way that I could some how log some information from the code similar to the fprintf. What I need is I need to extract somehow the packet header from the driver.
Thank you
Best Regards.
read about the proc fs, it's a great framework to extract data from device drivers.
once you have registered a device node as proc fs, you can read from it.
once the the read function is called, a callback function you defined is creating the output. this is an excellent way to retrieve data from device.
there are also two other methods, one is sysfs, you can google for it. and the second,
if the the device is a char device, you can implement an ioctrl function which returns the info you need.

Flash Player 9 vs Flash Player 10 with FLEX 3, ?_method=PUT/DELETE not working?

I have a FLEX 3 frontend that worked fine in FlashPlayer 9. But now that I've upgraded to FlashPlayer10, the ?_method=PUT/DELETE hack is not working anymore. All those requests show up as a POST on the backend now. I did some reading and it sounds like I need to use as3httpclientlib AND run a socket policy server to give access to port 80 (or any other port) in order to use as3httpclientlib. So my question is: are you freakin kidding me? How is it that, in earlier versions of Flex/flash player, all I had to do was add a simple string ("_method=") to the url. But now I have to do the hokey pokey AND turn my self around? Really? Please someone tell me that I've got this all wrong, and that _method= is, in fact, still supported. Otherwise, its BYE BYE FLEX/FLASH PLAYER - NEVER AGAIN!
I understand you very much, my friend, just had similar noise with authentication headers in new one Security Policy from Adobe. Anyway, if you'll share your code, maybe I could help you, because your goal is not clearly explained in your post, Buddy. So let me know please, cause java sandbox and silverlight are not the better way in this case. But maybe some javascript stuff could save our time.