Raspberry PI 2 + Module Relay + RS 232 + QrCode Reader - Raspberry Pi Q&A, Help & Troubleshooting

Hello everyone, I'm new here . I went from an Arduino raspberry pi greek 2 .
The material and this :
- Raspberry PI 2
- Datalogic Magellan 1100i
- Relay Module
- Form RS 232
What I do and this would affect :
By using the QRCode barcode reader or I should be able
whether a valid ë ( By comparison with the code format string or
Another with qrcode ) . If valid then Ê Activate the relay connected ( Should Be Very Simple ) .
Where do I start ?
Dove Can I find the Instructions That helps me create and this kind of " Activator relay via barcode scanner or qrcode ? ) .
REMAINING are in the old RS232 why are so many years What I use with Arduino and I'd like instead of USB .
Thank you
Cristian

Related

Usb Gamepad Working!!!!!! Andres Ortega First!!!

IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
You will need the following:
Registry Editor
Hidgamep.dll file (included)
4 in1 cable (and usb gamepad ) any with 1 joypad will work.
1. you will need to unzip the hidgamep.dll file into your windows directory on your phone.
2. open your registry editor, and find the directory [HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default
3. add the value "1_5". ( dont put the "")
4. open the value 1_5 and add the value "gamepad" ( dont put the "")
5. now add the key "hidgamep.dll" ( dont put the "") (this step makes windows use the driver)
6. save your work remove the usb device and reboot your phone.
7. now if you did this right, when you plug in your usb game pad it should give you a message. now all you have to do is set the buttons on your emulator and your off to gaming like a pro!!!!
Questions? email me
If you have any questions please email me at: [email protected]
if you want any other help also email me.
Where do you get a usb game pad? Kind of lost here. Seems interesting though.
it would be nice if you can port USB MassStorage Driver into Athena~
rickyrvl said:
it would be nice if you can port USB MassStorage Driver into Athena~
Click to expand...
Click to collapse
it already has this ??? but there is a size limit
where can u find the playstation emulator
Very interesting! Great work!
Does a normal USB-keyboard work with this?
(And is there a way to use localized keyboards with the Athena?)
Think I shall give this another try
I found the .dll on another forum a while ago but could not get it to work but might of been a very very ancient copy but I think I shall give this a try again, a couple of quick questions do you know how many buttons the .dll supports? And also does it map the pad to the standard joystick layout for games that do not allow you to reconfigure the keys?
If all goes well might consider getting one of these http://www.geniusnet.com/geniusOnli...50&_pageLabel=productPage&test=portlet-action
cuba3377 said:
IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
Click to expand...
Click to collapse
Do you know if this work on other WM devices too? I might try it next week if you are not sure.
My guess is "no" since it requires a USB host which only Advantage has...
update
this driver supports 2 axis controller and up to 8 buttons.
kareem9nba said:
Where do you get a usb game pad? Kind of lost here. Seems interesting though.
Click to expand...
Click to collapse
you can get a universal usb gamepad anywhere. i got mine at superwalmart 9 bucks
rickyrvl said:
it would be nice if you can port USB MassStorage Driver into Athena~
Click to expand...
Click to collapse
the driver for a mass storage device is already installed. i looked into it. the thing is that the battery on a phone is about 3.7v. a regular usb port has alot more than that. dont expect to power a hard drive with such low current. the drivers are installed so if you use thumb drives or multi usb port drives it will work.
irus said:
where can u find the playstation emulator
Click to expand...
Click to collapse
search google for ps emulator windows mobile fpsece
Moskus said:
Very interesting! Great work!
Does a normal USB-keyboard work with this?
(And is there a way to use localized keyboards with the Athena?)
Click to expand...
Click to collapse
the driver is already preinstalled with windows mobile 6. aslong as the current draw of the keyboard isnt more than 3.7 v
Oberth said:
I found the .dll on another forum a while ago but could not get it to work but might of been a very very ancient copy but I think I shall give this a try again, a couple of quick questions do you know how many buttons the .dll supports? And also does it map the pad to the standard joystick layout for games that do not allow you to reconfigure the keys?
the reason it didnt work is because the buttons need to be maped correctly. all my driver does is tell the pda what we want it to do when you press buttons. the axis is the directional keys on the board.
if you did want to reconfigure the map. its just plug n play with the driver, just remove the current mapping and add the keys you want to the driver. also u will know when u did it right because you will get a pop up box
Click to expand...
Click to collapse
It works
Hi Cuba337,
Got it sussed and now it works with a couple of joypads might get the one I linked above now. For anyone else trying this and getting stuck I found you need to tweak the intructions given.
Step 3, Add a new KEY named "1_5" (ignore the " ")
Step 4, Add a new KEY named "gamepad"
Step 5, Add a new STRING value called "DLL"
Step 5a, edit the value and enter "hidgamep.dll"
And that does the trick for me did not bother reseting the phone just plugged a pad in and it worked. It works with both my genuine HTC 4-in-1 cable and my no name 7500 dock with 2 usb ports on the side. It does feel a touch unresponsive but the only digital gamepad I have laying around is rather shoddy and my other spare pad has analogue pads which it's not keen on either so will get new pad and see what happens, will also see if the new PK4.0 rom helps when that comes out.
Thanks Cuba337
cuba3377 said:
IVE MADE USB GAMEPADS WORK ON OUR PHONE!!!!! now you can play your nintendo, super nintendo, genesis and playstation emulators on your T.V. and have a matching remote to boot.
You will need the following:
Registry Editor
Hidgamep.dll file (included)
4 in1 cable (and usb gamepad ) any with 1 joypad will work.
1. you will need to unzip the hidgamep.dll file into your windows directory on your phone.
2. open your registry editor, and find the directory [HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default
3. add the value "1_5". ( dont put the "")
4. open the value 1_5 and add the value "gamepad" ( dont put the "")
5. now add the key "hidgamep.dll" ( dont put the "") (this step makes windows use the driver)
6. save your work remove the usb device and reboot your phone.
7. now if you did this right, when you plug in your usb game pad it should give you a message. now all you have to do is set the buttons on your emulator and your off to gaming like a pro!!!!
Click to expand...
Click to collapse
nice job... just one question does it work with any game pad?
Awesome job
Thanks for the .dll posting and the notice to get things working for the gamer in all of us
Can you post links to the set of utilities that you are using? A consolidated list of game emulators and versions that support the config that you are using and talking about?
I have all of the older emulators, but I have had trouble getting many of them to work in REALVGA mode. Do you have yours working in VGA mode? Since you have a working solution it would be really really cool to get all of the links from you for the solution that you have put together. I would personnally be grateful for the time saved from testing unknown configurations...
Thanks,
Bob
Auto Config File For The Dll
Instead of asking for it I am deciding to post it. LOL
Create a .REG file and place this into it's content.
Code:
[HKEY_LOCAL_MACHINE\Drivers\HID\LoadClients\Default\Default\1_5\gamepad
"DLL"="hidgamep.dll"
Place the file on your device and run it. I don't know if the run method works as it should on
a windows pc but it should in theory. After a successful merge of the file you may delete it.
Personally I would place it in the DLL's zip file so it does not get lost for future installations.
If there is a CE Hacker out there looking for an example to follow you might want to
consider the following information taken from windowsfordevices.com
DB files define the default RAM-based property database for the object store. The
syntax is a bit cryptic, but it is documented. For Platform Builder-generated systems,
it is rare to need to use the database at all, except to set up the automatic
connection for ActiveSync, as follows:
Code:
; This is the database initialization file.
; format is as follows -
; Database : db name : type in hex : num sort order : hex propid : hex flags ....
; CEDB_SORT_DESCENDING 0x00000001
; CEDB_SORT_CASEINSENSITIVE 0x00000002
; CEDB_SORT_UNKNOWNFIRST 0x00000004
; CEDB_SORT_GENERICORDER 0x00000008
; A database specifier can be followed by any number of record specifiers
; Record :
; A record specifier can be followed by any number of field specifiers
; Field : hex propid : value [ either string or hex dword ]
; End (ends a matching database or a record context)
Database: "DB_notify_events" : 0 : 1 : 0001001F : 0
; 0001001F - PROPIDR_NAME
; 0002001F - PROPIDR_CMDLINE
; 00030013 - PROPIDR_EVENT
Record :
Field : 0001001F : "repllog.exe"
Field : 0002001F : "AppRunAtRs232Detect"
Field : 00030013 : 9
End
End Database
This DB file will set up the notification database to run REPLLOG whenever an RS232
event is triggered. This will start the connection process on the default "hot plug"
port for ActiveSync.
Maybe you can map an 8-way d-pad with buttons to the keyboard with this method and speed up the response time without using C/C#/C++? I Dunno. I Never heard of
using a DB file as a driver until I read up on the REG files.
For those who don't know but are interested RS232 is Infrared. I'm sure the codes
above could be changed to a USB or even Bluetooth COM Port.
Somebody Push this thread to my favorite COOKS!

[APP] DroidMote Server & Client - Wifi Control between Android Devices ++

Hi Androiders.
With your android phone, with one application called Mod Edit link removed you can control another android Phone or Tablet, a Windows pc or a Linux pc, on wich you have installed Mod Edit link removed
DroidMote is not only a remote mouse, a remote keyboard, a remote gamepad and a remote multi touch touchpad, but it is something more.
In fact, with the Gamepad2Touch feature allows you to use all the applications and games that were developed to support only devices with touch screen. Imagine you want remote control a game, designed for touch screen devices on your large TV Full HD, with DroidMote you can.
Just create, in a few simple steps, a "touch profile" with the application "Touch profile Creator" that you can download in the attachment.
Mod Edit link removed
DroidMote is fully customizable, in the Server part you can create your own file droidmote.kl to change the default action of the keyboard keys, of the buttons and axis of the gamepad. In the Client part you can create your own "touch profile" to simulate touch events on the remote screen.
The client and the server to connect must be or on the same local network, or connected to the internet to control remote devices over long distances.
If you not have a wifi router, you can connect the server and the client directly (point to point) by activating the function Tethering/portable hotspot on your phone or on your tablet. Connect the phone to the tablet or the tablet to the phone. Click start on server, get the ip and put it in the client.
You do not need bluetooth,the bluetooth is slow and cover small distances.
DroidMote Server must be installed on the device to be controlled.
DroidMote Client must be installed on the device controller.
ONLY THE DEVICE WITH THE SERVER INSTALLED NEEDS TO BE ROOT.
IN THE SERVER DEVICE , MAKE SURE YOU HAVE BUSYBOX UPDATED AND YOU HAVE THE UINPUT MODULE IN THE KERNEL LIKE MOST ANDROID DEVICES.
Mod Edit link removed
Features:
[✔] Remote Mouse
[✔] Remote Multitouch Touchpad
[✔] Two Fingers Scroll Zoom Rotate
[✔] Remote Keyboard
[✔] Remote Mediaplayer
[✔] Remote Dpad
[✔] Remote Multitouch Gamepad
[✔] Remote Control with accelerometer
[✔] Two virtual analog stick on screen
[✔] Touch emulation allows you to map buttons and analog sticks to the screen. Play all your favourite games with full analog support, even those without built-in controller support!
[✔] TouchMouse for games that not support a real mouse
[✔] Voice dictation with android keyboard
[✔] Gesture typing with android 4.2 keyboard
For the Server part:
Android versions > 2.2:
support: mouse,keyboard,dpad,mediaplyer,gamepad to keyboard.
Android versions > 3.2:
support: mouse,keyboard,dpad,mediaplyer,real gamepad, multitouch touchpad,touch profiles.
If you are satisfied with DroidMote is much appreciated a good vote/review on Google Play​
Video Playlist: Mod Edit link removed
Mod Edit link removed
For the DroidMote Basic gestures look this videos:
Mod Edit link removed
How to customize keyboard keys, buttons, and axes actions in DroidMote Server:
Video Mod Edit link removed
The folder location of droidmote.kl is /system/usr/keylayout ------> this file is for customization
The folder location of droidmote.kcm is /system/usr/keychars
This two files by default, in android version > 3.0, are automatically installed at first installation on the device with the server inside.
To know which scan codes send the client you can install in the server part the free tool (Keyevent Dispaly in the android Market).
Then follow these simple steps:
1) connect the client to the server
2) make sure everything works
3) on the server start the tool Keyevent Dispaly
4) click a button on the client
5) read the scan code on the Keyevent Dispaly
6) open the file /system/usr/keylayout/droidmote.kl
7) put the scan code on the left and on the right the new custom action
8) reboot the device with the server installed.
You can find the list of custom action to this android developer page:
http://developer.android.com/reference/android/view/KeyEvent.html.
The default scan codes for droidmote buttons are:
Arrow up is key 314
Arrow down is key 316
Arrow left is key 317
Arrow right is key 318
Arrow up-left is key 312
Arrow up-right is key 313
Arrow down-left is key 288
Arrow down-right is key 306
A button is key 304
B button is key 305
X button is key 307
Y button is key 308
Z button is key 309
square button is key 310
circle button is key 311
triangle button is key 315
Only honeycomb and later versions of Android include the use of buttons and axes:
key 304 BUTTON_A
key 305 BUTTON_B
key 306 BUTTON_C
key 307 BUTTON_X
key 308 BUTTON_Y
key 309 BUTTON_Z
key 310 BUTTON_L1
key 311 BUTTON_R1
key 312 BUTTON_L2
key 313 BUTTON_R2
key 314 BUTTON_SELECT
key 315 BUTTON_START
key 316 BUTTON_MODE
key 317 BUTTON_THUMBL
key 318 BUTTON_THUMBR
If you have the DroidMote Server installed on a version earlier than honeycomb but you want utilize the buttons, open the file querty.kl and add:
key 304 A
key 305 B
key 306 C
key 307 X
key 308 Y
key 309 Z
key 310 D
key 311 E
key 312 F
key 313 G
key 314 H
key 315 I
key 316 L
key 317 M
key 318 N
You can customize also the axes from honeycomb and later version of Android:
left stick x is 0x00
left stick y is 0x01
right stick x is 0x02
right stick y is 0x05
accelerometer x is 0x10
accelerometer y is 0x11
In the default configuration you have:
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 LTRIGGER
axis 0x04 RTRIGGER
axis 0x05 RZ
axis 0x10 HAT_X
axis 0x11 HAT_Y
in this configuration you use the left stick to move the avatar --> X and Y and the right stick to change view of the avatar --> Z and RZ
If you want you can change this in:
axis 0x00 Z
axis 0x01 RZ
axis 0x02 X
axis 0x03 LTRIGGER
axis 0x04 RTRIGGER
axis 0x05 Y
axis 0x10 HAT_X
axis 0x11 HAT_Y
in this configuration you use the left stick to change view of the avatar --> Z and RZ and the right stick to move the avatar --> X and Y
Another useful configuration for the axes if you want use the analog LTRIGGER and RTRIGGER is:
axis 0x00 X
axis 0x01 Y
axis 0x02 Z
axis 0x03 LTRIGGER
axis 0x04 RTRIGGER
axis 0x05 split 0x00 RTRIGGER LTRIGGER
axis 0x10 HAT_X
axis 0x11 HAT_Y
in this first configuration you use the left stick to move the avatar --> X and Y and the right stick to change view when you move left and right, instead if you move up and down you use the LTRIGGER and the RTRIGGER. (is useful to drive a car or generic racing game).
If you have a racing game or you want move the character with the accelerometer, you can change the defaul axes 0x10 and 0x11 with all you want.
For more information on the customization look at:
http://source.android.com/tech/input/key-layout-files.html
Games that support gamepad only for testing the "real gamepad" emulation future:
- Shadowgun
- Riptide Gp
- Reckless Getaway
- GTA 3
- Onlive games with this patched apk link or mirror-1
- Raging Thunder II
- Cordy
- Hockey Nations 2011
- All Emulators
Updated list:
http://forum.xda-developers.com/showthread.php?t=1542820
Suggest a new game with the gamepad support !
For games that do not natively support gamepads, you can create a touch profile with the app "Touch Profile Creator" and put the xml file created in the sd card of the device in which you have installed DroidMote Client.
--------------------------------------------------------
FREE WINDOWS, LINUX, ANDROID X86 DROIDMOTE SERVER
Mod Edit link removed
--------------------------------------------------------
For Linux:
Disable the firewall on port 2302
chmod 777 ./droidmote
sudo su
For Windows:
First install the drivers as specified in the drivers folder.
Then launch the application droidmote with port and password.
For games that require a mandatory Xbox 360 controller, put the xinput1_3.dll and x360ce.ini from xbox-emulator folder to the folder of the game whare is the main .exe file.
Install c++ redist 32 also in 64 bit windows.
DroidMote Windows Server Installation Tutorial:
[ Mod Edit link removed
For Android x86:
For only users that have google market ready on the x86 devices:
you can download the apk in the Attached Files.
I'm going to try this....this is what I've been waiting for! Thanks!!
---------- Post added at 06:37 AM ---------- Previous post was at 06:26 AM ----------
It didn't work with my unrooted TF.
Unless I missed it, you need to state clearly that it's for rooted TF's.
thank for this man!+1 for the work,i wil try it now on my tf!
hello
Just bought this, but cant use it, licence problem.... :-(
x 006fazer
write to me in pm.
Hi same problem with the last update :-(
i'm sorry for you.
i can help you if you say to me what you have installed on your transformer.
kernel rom etc..
ok all is working god with uninstalling and reinstalling the server side ;-)
Hi guys,
in order to connect the smartphone to the tablet do i need a router wifi or not?
Hui there,
Is there a trial version? Would like to test
Sent from my HTC Desire HD using Tapatalk
You can connect the server and the client via wifi router or with wifi direct (ad hoc wifi connection)
Does that mean it will work if connected to my phone by WiFi hotspot??
Sent from my HTC Desire HD using XDA Premium App
zulu99 said:
You can connect the server and the client via wifi router or with wifi direct (ad hoc wifi connection)
Click to expand...
Click to collapse
Can someone walk me through connecting via ad hoc wifi connection?
in the ice cream sandwich all the phone and tablet have natively this function.
currently have to use some tricks or install a special application on the basis of what is your phone model.
for each phone model you'll find the right discussone in xda forums.
p.s. in the transformer rom prime 2.x.x the authos say to the changelog : "native support of adhoc wifi "
shaunjpeterson said:
Does that mean it will work if connected to my phone by WiFi hotspot?
Click to expand...
Click to collapse
in theory yes. but in practice if you active the wifi HOSPOT then do not browse the Internet from that device for now with wifi. (but with 3g yes).
the wifi adhoc is different from the actual function wifi hotspot.
wifi adhoc is one to one wifi connection. wifi hotspot emulate a router but you can not use the wifi network card when this function is actived.
zulu99 said:
in theory yes. but in practice if you active the wifi HOSPOT then do not browse the Internet from that device for now with wifi. (but with 3g yes).
the wifi adhoc is different from the actual function wifi hotspot.
wifi adhoc is one to one wifi connection.
Click to expand...
Click to collapse
I'm not sure if I understand. When I activate WiFi hotspot on my phone, WiFi turns off. My tablet connects to my phones WiFi hotspot. Will I be able to control my tablet with my phone this way? Thanks.
Sent from my HTC Desire HD using XDA Premium App
shaunjpeterson said:
I'm not sure if I understand. When I activate WiFi hotspot on my phone, WiFi turns off. My tablet connects to my phones WiFi hotspot. Will I be able to control my tablet with my phone this way? Thanks.
Sent from my HTC Desire HD using XDA Premium App
Click to expand...
Click to collapse
sorry for the wrong answer.
I just tried your configuration and i say:
"yes you can but you can not go in internet with wifi only with 3g."
the galaxy s II have the function wifi direct native.
i tried DroidMote Server and Client between two galaxy s II with wifi direct and it work very very well.
I have purchased the app. I have rooted my transformer and instaled the server on it.
I had a license problem because of the multiple gmail accounts, but I have deleted them and it works.
I have installed the client on my Samsung Galaxy S II and both, server and client, open correctly, but it does not works.
I have changed the ip, the password, the port, but they do not pair together.
Could you help me?
Thanks
the server and client must be on the same network. If you click on the server the start button you can see an ip address. Take this ip and put the same ip address on the client. After this on the client click connect.
make sure the two devices are visible via a ping, and uses the same port and password. Between the transformer and the Galaxy S II has been tested and works very well.
If you have a problem contact me in private and can chat with me.

Controlling GPIO via web (Raspberry Pi 2)

Hello,
WebIOPi isn't compatible with Raspberry Pi 2.
Is there another way to connect GPIO on RPi2 via web?
Depending on how sophisticated you want that control to be, it's not hard to achieve from scratch. Here's a complete example of toggling a few GPIO pins from the web: https://github.com/pimoroni/Raspberry-Pi-Web-RGB
Or if you're dead set on using WebIOPi there seem to be patches for Pi 2 support here: https://github.com/acrobotic/Ai_Demos_RPi/tree/master/demos/gpio
They look legitimate, since they include the shifted memory address for the Pi 2 GPIO ( https://github.com/acrobotic/Ai_Dem.../webiopi_raspberry_pi_2_cpu_support.patch#L45 ), but I haven't tried applying them.

Need help for merging python programs

I was doing my first raspberry pi electronic project. I choosed the adafruits Google docs logging project for a start. The project was a success and I obtained a complete output. My problem is , when I looked into the python program provided by adafruit (got it from github) it is calling other small programs. So I looked one of the called programs and it again calls other program.
I want to write a complete program that includes all the necessary things ie a stand alone version.
I want to write it in python 2. Also use a gpio pin 5. My model of pi is raspberry pi 2 model b.
I don't know whether I can include driver in my program. But if it is possible , I also want to include the driver too, please help me.

How to create library that handle flow?

I'm new on the android develop. I need to write some application that contain 8 kind of flow. For example
flow 1 need to deal with GPS - and return some information about analyzing GPS signal
flow 2 need to deal with network - and return some information about analyzing the network signal
i want to write my application in a way that each flow will appear on different project / library
(i'm a c#/C++ developer .. so in C#/C++ its call a dll ( dynamic library ) and its very easy to re-use the library in different projects )
How to do it on android platform ?
( i using android studio IDE )

Categories

Resources