GPIOs as Services - Raspberry Pi Development

Hey guys, I put this simple package together which allows you to turn on and off GPIOs from the command line as services. This can be used for all sorts of things.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Instructions:
1. Download this package http://forum.xda-developers.com/attachment.php?attachmentid=1780219&stc=1&d=1362453406
2. unTar.Gz it to the root directory of your Raspberry Pi. There's 6 files which go into /etc/init.d. The files are InitGPIO, led0, led1, led2, led3, and led4. These services control GPIOs 0, 1, 4, 14, and 15. See the chart below for more information.
3. Connect LEDs with 100 ohm resistors to the corresponding GPIOs using an old IDE hard disk cable.
Use
Initialize the GPIOs first
Code:
service InitGPIO start
Turn on LEDs with
Code:
service led0 start
service led1 start
service led2 start
service led3 start
service led4 start
Turn off LEDs with
Code:
service led0 stop
service led1 stop
service led2 stop
service led3 stop
service led4 stop

Great job! This will be useful!
Sent from my GT-S5830 using Tapatalk 2

Seems like a neat solution. How fast can you toggle the pins? I can check with a scope if you haven't already .
Sent from my Nexus 4 using xda premium
Edit: It hit me that I could just look at the source, doh. As it's using echo you should get about 3.4khz.

I haven't checked.

Have you already posted specs and software for your "Root All The Things Box" if not, are you going to as I'd like to build one myself.

Contingency™ said:
Have you already posted specs and software for your "Root All The Things Box" if not, are you going to as I'd like to build one myself.
Click to expand...
Click to collapse
I saw the root box on xda-tv. Looks great!
Sent from my GT-S5830 using Tapatalk 2

thanks for the services I wanted to test some things with the GPIOs (controlling a DC motor with an H-bridge) and I was to lacy to do the python programming so your binary were really convenient

Thanks for your work :thumbup:
Just to confirm, can I use this to control DC motors instead of leds? and if so do I have to change anything?
Sent from my HTC Vision using xda app-developers app

aishiscool said:
Thanks for your work :thumbup:
Just to confirm, can I use this to control DC motors instead of leds? and if so do I have to change anything?
Sent from my HTC Vision using xda app-developers app
Click to expand...
Click to collapse
You would want to use transistors or relays to drive them.

This will be handy while I figure out just what I can use my spare Pi for...

Related

HOw to take screen shots

how do you take screenshots on vibrant?
ShootMe
Sent from my Vibrant using the XDA app.
Or if you have ADB installed, you could run ddms.bat (from the tools folder I believe is where it's at) to capture a screen shot. You must have USB debugging enabled also.
what adb
eweo911 said:
Or if you have ADB installed, you could run ddms.bat (from the tools folder I believe is where it's at) to capture a screen shot. You must have USB debugging enabled also.
Click to expand...
Click to collapse
i am rooted but i dont know what ADB is?
Theres an app for that its called screen shot it download it and it will give you options to keep the app on your tool bar up top on your home screen
The guy on the couch
The guy on the couch
You're probably better off just downloading one of the programs these guys are telling you about then. They will all get the job done for you.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The guy on the couch
The guy on the couch
The first one I had to throw in the xda in the corner cause I love this site!!!!
The guy on the couch
Drocap2 works for me
Sent from my SGH-T959 using XDA App
If you are already rooted, shoot me from the market works really well as a previous poster stated. I have no experience with the other apps.
Sent from my SGH-T959 using XDA App
Shoot me it is ty
Sent from my SGH-T959 using XDA App
Shagman68 said:
ShootMe
Sent from my Vibrant using the XDA app.
Click to expand...
Click to collapse
what he meant was a program called "ShootMe"
and you gotta be rooted.
Confused
My vibrant is taking random screenshots of my phone. I will be doing something random like texting or surfing online and I will hear a click from the camera. The bottom of my screen will say screenshot saved. I dont know what I am doing to cause this. Sure there is times I would like to take a screenshot if I knew how it worked, but these are so random. I am running 2.2 and have not installed any apps for that function

My Mobiler For Android (BETA) - Control Phone with PC/Screenshots/Capture Video/Files

My Mobiler For Android is Here. Its still in beta stages.
I didn't create this software, I'm just pointing it out.
It works pretty well.
MyMobiler for Andorid provides :
•View your mobile screen on your desktop.
•Control your mobile by using desktop keyboard and mouse.
•Copy/Cut/Paste text between device and desktop.
•Capture mobile screen.
•Drag and drop files to your mobile.
•Support USB connection / IP Connection (WiFi)
•Support Notification Bar.
Requirements :
•Requires your Android device ROOTED.
•Requires Android Version 2.2 and above.
•Beta build, still developing and some of feature can be changed.
•Support page is coming.
DOWNLOAD - http://mymobiler.com/?p=42
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i remember trying that program out on my old hd2, nothing quite like using windows to remotely control your windows phone lol
Wow, what a great app!
You got down bro
Sent from my PG86100 using xda premium
An essential program for Windows Mobile and now an essential for Android ... I've been waiting for an Android version. Since the Vouge ports
Sent from my HTC EVO 3D using the XDA Premium App!
Tried it and its pretty cool. Only thing annoying me is they it constantly starts up after reboot. Am I missing a setting, I didn't see where to shut that feature off. I don't want it constantly starting at reboot.
Sent from my PG86100 using xda premium
What about video capture frame rate? Is it more than 25?
fenomen5 said:
What about video capture frame rate? Is it more than 25?
Click to expand...
Click to collapse
Nexus 7 gives a 1 (yes, ONE) frame per second recording rate.
i used 2 use this on my Windows Mobile 5 and 6, and 6.5
such an amazing app
glad its back for Android!

Say 'Hi Galaxy' to wake me up

I am fed up.
Love this S3 but S Voice is not working correctly. I have a Verizon S3.
When I ask: WHAT IS 5 + 5
or any other WHAT IS question I get:
Say 'Hi Galaxy' to wake me up
I have went into settings and into applications manager, all, S Voice, Clear Data and NO LUCK
I have also Factory Data Reset the phone and still same Say 'Hi Galaxy' to wake me up
HELP!!
It was never meant to be a conversation app. It was meant to be good tasker. That's it.
If you want to do that, download Skyvie.
Nevermind mine does the same thing. I dunno what the deal is.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SCH-I535 using xda app-developers app
It's not Siri, follow the instructions and it will work just fine.
Mine works good.
Powered by the SGSIII
nosympathy said:
I get that if i dont either say hi galaxy or if i dont press they button.
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
I have tried with saying Hi Galaxy and pressing the button. Still doesnt work.
sandtiger75 said:
I have tried with saying Hi Galaxy and pressing the button. Still doesnt work.
Click to expand...
Click to collapse
Sorry I answered too fast. Mine does the same thing. I edited my post.
Sent from my SCH-I535 using xda app-developers app
5 + 5 = 10 brruuuhhh :laugh:
After saying 'Hi Galaxy' about 10 times I gave up and just hit the mic button.
From that moment on almost everything i said / tried to asked followed with "I didn't get that".
It does work well when you ask it to search the web tho..

Elm agent

I tried to Google this and couldn't find what it is. Just wondering what it is and what it does? Thanks!
Sent from my SCH-I545 using xda app-developers app
From google'ing the ELM Agent on the internet I haven't been able to find something specific within a short period of time, but I have found references to mail servers.
So I would think this is your answer.
http://forum.xda-developers.com/showpost.php?p=44716164&postcount=7
It has to do with the activation agreement of some enterprise service email account you add to the phone. Then logging of that email account's actions. Haha thats a rough guess based on just looking through the apps intents etc.
Stumbled upon this thread during my search to find out what ELM Agent is.
Found this - ELM Agent - Emulated Legacy Mount for multi-user support
And yes, I know this thread is old.
would it be ok to freeze/delete?
I did and I don't see any side affects.
Sent from my SM-N900A using Tapatalk
Coincidentally found this thread today after having these messages on my phone and freezing ELM Agent also.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my SCH-I545 using Tapatalk
Redflea said:
Coincidentally found this thread today after having these messages on my phone and freezing ELM Agent also.
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
Can we freeze this?
sprhwk said:
Can we freeze this?
Click to expand...
Click to collapse
Just uncheck it under settings/security
Sent from my SM-N900A using Tapatalk
Elm Agent ,tracker, collects all your data , mail, GPS,msg, phone calls, voice mails,etc.
Someone put it there , does your phone get hot, battery drain faster, 5 to 10 second delay or locking up when you make calls, light up by itself?

Someone to Modify an App-Will Pay

I need an app modified. A cooking temperature app. What I need is for someone to change the preset temperatures for the different meats and doneness levels. I have tried on my own. Downloaded some apps, downloaded WinRAR and poked around and couldn't find the temperatures or doneness levels. I did this with multiple apps, not just one.
I haven't chosen the app yet. I want to wait until someone is willing to do the work. I am willing to pay. If you are wondering why, it is because they are all set to USDA safety temperatures, not real chef temperatures. So everything is always overcooked.
Give an example of what apps you are looking for.(app name). It may be possible
Sent from my [device_name] using XDA-Developers Legacy app
steha said:
Give an example of what apps you are looking for.(app name). It may be possible
Click to expand...
Click to collapse
The Play Store apps are:
EasyBBQ
RÖSLE BBQ
WS Thermometer
This one being my preferred choice - BBQ Go
https://play.google.com/store/apps/details?id=qlnet.com.bbqgo
Thank you.
Ill have a look when i get chance. Can you give an exsmple of what you want cganging. Eg what the app says as stock and what you would like it to be changed to.
Sent from my [device_name] using XDA-Developers Legacy app
steha said:
I'll have a look when I get chance. Can you give an example of what you want changing. Eg what the app says as stock and what you would like it to be changed to.
Click to expand...
Click to collapse
Chicken - Well-Done - 165°F change to 160°F
Fish - Well-Done - 145°F change to 130°F
Ground Beef - Well-Done - 167°F change to 145°F
Original temperatures from the BBQ Go app
https://play.google.com/store/apps/d...lnet.com.bbqgo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Bump
Can anyone help? PLEASE!!!!

Categories

Resources