[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]

tech - God bless the AMD

2nd chances
Name
Email
Subject
Comment
File
Password (For file deletion.)

BUY LAINCHAN STICKERS HERE

STREAM » LainTV « STREAM

[Return][Go to bottom]

File: 1448294233349-0.jpg (1020.9 KB, 1920x1074, defcon-screen02.jpg) ImgOps Exif iqdb

File: 1448294233349-1.png (54.95 KB, 756x511, arch_linux_raspberry_pi.png) ImgOps iqdb

File: 1448294233349-2.jpg (24.41 KB, 500x380, 41wyzfOfE2L.jpg) ImgOps Exif iqdb

 No.14248

Disclaimer: Am scrub at Linux

I am moving into a new house and I am getting a new room. To fit, I wanted to create a RasPi that would control my entire room, kind of like a /cyb/ smart house only it runs on Linux.

In my ideal, and probably unrealistic, expectations, I wanted to have the RasPi plugged into an old 19” LCD, controlled by a wired xbox 360 controller with right and left trigger bound to mouse buttons and the analogue stick working to move the cursor around. There is very little need for any typing, if any once it is booted up.

From there I want to create a simple GUI to turn on and off several USB ports that will power small speakers, LED lights and some other simple stuff for my room, nothing that needs anything beyond “turn on” and “turn off”.

After this I want it to have the final ability of being able to play the game “Defcon”, for which I know there is Linux support. To what extent, I am not familiar. I will use this like a screensaver where I let the bots play their game in the back ground to give my room a Cold War command centre vibe for the hell of it.

This is as much a learning experience as it is designed to actually succeed. So my question is the following: Is it possible? If so, what methods are the most efficient to accomplish the goal? If not, what needs to be changed to make it achievable?

I currently have limited knowledge in coding, but I am fully prepared to learn any language to whatever extent I required to achieve this. Regardless of anything, that’s why it is a learning experience.

So what Distro should I use? What language for the GUI? Are there ways to use 360 controllers as mice? What am I missing? What would make this better? What would you add or remove?
>>

 No.14250

>>14248
>Is it possible?
No.
>If not, what needs to be changed to make it achievable?
Defcon is not available for the ARM architecture. You could probably ask the publishers to give you an ARM build but I doubt they'll listen. You could try to use QEMU to run defcon but it'll probably not work, as defcon alone must be too resource-intensive for a rasppi.

If you forget about the defcon thing, doing what you want to do is probably possible.
Creating a GUI that works using a gamepad is probably dead-simple, I'd recommend doing it either in C with the SDL, or maybe python as it is an easier language to work with which must have quite a lot of libraries to interact with a gamepad.
I do not know if it is possible to control whether the USB ports are powered or not. I don't think so but I might be wrong.
Turning on led lights is pretty easy. The "other simple stuff for my room" might or might not be easy depending on wat it is.

>What Distro

Whichever you want. My personnal favorite is debian but than really doesn't matter for what you're trying to achieve. I think debian would be a good choice as most of its software selection is available precompiled for ARMv7 (which is the rasppi2's architecture).
>What language for the GUI.
Whichever you know the best. If yu don't know anything, either C or Python.
>Are there ways to use 360 controllers as mice
Yes but as you'll be creating your own GUI you don't really need that, do you ?

>>

 No.14252

>turn on and off several USB ports that will power small speakers, LED lights and some other simple stuff for my room
You need to make sure the raspberry pi lets you turn off usb ports. High quality devices have specialized current limited drivers for usb power that often allow for software control, but cheap soykaf (like the raspberry pi) sometimes just connects it straight to the 5v rail. If the USB ports don't let you control them you can use the GPIO with some FETs.
>I want it to have the final ability of being able to play the game “Defcon”, for which I know there is Linux support
Just because it supports linux doesn't mean it'll run on a raspberry pi, just like how crysis won't run on windows phones. Most (proprietary at least) linux games are either x86 only or android games; unless you find specific mention of ARM/raspberry pi/pandora support it probably won't work.
>Are there ways to use 360 controllers as mice?
Yes, there is software available. Controllers generally suck for precise/absolute movement though. If you're making your own GUI you might as well give it real joystick support. For that you can use pygame or some other SDL binding.

>>

 No.14261

File: 1448318669342.png (489.4 KB, 500x250, Oekaki.png) ImgOps iqdb

It sounds a lot like my setup. I use a playstation-like USB gamepad in my laptop and configure it using antimicro (map gamepad keys to PC keys) and xbindkeys (map PC keys to commands) to do anything.
I don't use USB-powered peripherals but I made a switchboard for controlling which devices get power from the wall socket. More or less drew it.

If you try antimicro you'll see it's awful for a bunch of reasons, there might be a better alternative somewhere.

>>

 No.14268

>>14250
The lack of Defcon is unfortunate but not a game breaker, I will probably just set up some massive graphics project to get a similar thing going on repeat as a screensaver or something. I just have a weird thing for cold war computing and war fighting tech.

I was thinking of using Python as the OS I was going to use unless otherwise advised was Arch, for which I always run into python files lying around. learning and being able to understand what they are when I open them could be advantageious beyond making the GUI.

The GUI was just going to be a few very large buttons that will remove the need for precision that you get with a mouse. So half a dozen large buttons, each one controlling LED lights, speakers or the cold-war background to turn them on and off.

>>14252

Real joystick support? What do you mean by that? I actually have a CH Combatstick so I could use that instead of the 360 controller if you thought it was better?

>>14261
Do you use the analogue stick for mouse controls? I was thinking of setting up macros on the other buttons on my 360 controller for the purpose of quickly adjusting LED lighting and such in my room, so we'll see how well that does or does not go.

>>

 No.14285

>>14268
>Do you use the analogue stick for mouse controls?
In mouse mode, yes, one analog controls the cursor and the other one scrolls. I have a mouse mode, a music mode, etc.
>setting up macros on the other buttons
I mapped some buttons to commands so I don't have to click stuff around, you can do almost anything that way. I don't have experience with RPis tho.

>>

 No.14289

File: 1448381718447.jpg (53.57 KB, 700x350, Dishonored_power_wheel.jpg) ImgOps Exif iqdb

>>14268
Python is useful to know yes.
>Real joystick support? What do you mean by that?
In Linux land joystick often refers to any of those game input devices like joysticks, gamepads, plastic guitars, etc because they are all handled by the joystick kernel subsystem. I mean that you should use the input directly instead of emulating a mouse. Pygame/SDL provides an interface for accessing joystick/gamepad input. For example you could use a wheel interface which works better with an analog stick instead of a button interface which works better with a mouse.



Delete Post [ ]
[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]