Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Raspberry Pi  (Read 352 times)

Nightcore Angel

  • Bay Watcher
  • Noice! Now, keel over and DIE!!!
    • View Profile
Raspberry Pi
« on: April 21, 2017, 10:06:48 am »

So the story starts with me recently got into learning C#, ive played computer games since like...2.5 Years old? I thought its high time i grew up and start exploring further. One day, I was talking with my friend about the difference and similarity of C# and Python, until he brings up to me about this curious device, Raspberry Pi, he told me that its a cheap and compact computer that people often use for DIY projects, i told my dad about it, and he was like "oh wow son, this is interesting, you know, you learn programming, maybe you could make something with this" so he told me to buy it.

So my question is..."Where to start?" and "What kind of skill and/or knowledge do i need to have for me to use RB Pi"
I know you might say that it depends on what im making or plan to use-and i know it kinda is, but im more keen on finding the answer "how to use this thing?". For starters, i know you need to learn python to make a program and run the hardware its attached, be it an RC drone, a coffee machine or a sun-tracking solar panel, etc... then there was the actual thing...i dont know anything about wiring, electricity/electrician, I/O (heck, i dont even know what I/O means-i just saw some diagrams the other day about all the available I/O slot the RB Pi has, and i understand none of them)...

So anyone knows anything, please tell me, i too am in the process of researching about this.
Thx for your help in advance

-Nightcore Angel
Logged

Khan Boyzitbig

  • Bay Watcher
  • [THOUGHTS:CHAOTIC]
    • View Profile
Re: Raspberry Pi
« Reply #1 on: April 21, 2017, 10:24:48 am »

I/O is usually Input/Output.

Wiring is tricky and will greatly depend on what you want to wire, generally its just connect a - b.
Its been a while since I used one but as long as you don't overload stuff (do not wire a 3v bulb to a 12v supply unless you like to ruin stuff violently) it should get easier from experience. Also be aware that motors can cause troubles with other parts of the Pi, not 100% sure what causes it (could be EMP or just vibration or something else) or 100% sure what the results will be.

They are nifty little devices though and a good way to learn how electrical engineering can work with software engineering.
Logged
////;::;\\\\ Scuttle Scuttle...

Milk for the Khorneflakes!

Sinned

  • Bay Watcher
  • <Intentionally left blank>
    • View Profile
Re: Raspberry Pi
« Reply #2 on: April 21, 2017, 12:15:46 pm »

Never bad to pickup some python while you are at it.

It's a bit harder to tell you "where to start", don't know how comfortable you are with linux. These days  the raspberry pi can run more demanding OS's more easily then the first batch.

What I wanted to point out, and you might already have known, don't forget about Mono (http://www.mono-project.com/) ... you can use your C# skills to develop on it also. Many linux distro's have packages for it.

Still, python, good pickup...

* https://learnpythonthehardway.org/book/ (Basics)
* https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world  (MVC - if you are interested in these)

Many other resources are out there. And yes, python runs fine on windows also...
« Last Edit: April 21, 2017, 12:26:36 pm by Sinned »
Logged
When you find yourself in the company of a dwarf and an ill-tempered Dragon, remember, you do not have to outrun the Dragon... just the dwarf.

TheBiggerFish

  • Bay Watcher
  • If you want to talk about anything, you can PM me.
    • View Profile
Re: Raspberry Pi
« Reply #3 on: April 21, 2017, 09:02:08 pm »

And if you feel like game dev'ing, there are a lot of things out there in C#.
Logged
Sigtext
RIP Spearbreakers, may your !!SHENANIGANS!! return sometime soon.
It has been determined that Trump is an average unladen swallow travelling northbound at his maximum sustainable speed of -3 Obama-cubits per second in the middle of a class 3 hurricane.

Nightcore Angel

  • Bay Watcher
  • Noice! Now, keel over and DIE!!!
    • View Profile
Re: Raspberry Pi
« Reply #4 on: April 22, 2017, 12:00:50 am »

Ah, ok, thx guys, thats interesting to know.
And if you feel like game dev'ing, there are a lot of things out there in C#.
Yeah, so i heard with Java and C++.

I/O is usually Input/Output.

Wiring is tricky and will greatly depend on what you want to wire, generally its just connect a - b.
Its been a while since I used one but as long as you don't overload stuff (do not wire a 3v bulb to a 12v supply unless you like to ruin stuff violently) it should get easier from experience. Also be aware that motors can cause troubles with other parts of the Pi, not 100% sure what causes it (could be EMP or just vibration or something else) or 100% sure what the results will be.

They are nifty little devices though and a good way to learn how electrical engineering can work with software engineering.
Yeah, this is one of those things i know i need to be aware of but not actually know what it is, i do know you need to have a transformer when dealing with different  currents, but thats all i remember from my physics class, i even forgot the calculation for it.

Never bad to pickup some python while you are at it.

It's a bit harder to tell you "where to start", don't know how comfortable you are with linux. These days  the raspberry pi can run more demanding OS's more easily then the first batch.

What I wanted to point out, and you might already have known, don't forget about Mono (http://www.mono-project.com/) ... you can use your C# skills to develop on it also. Many linux distro's have packages for it.

Still, python, good pickup...

* https://learnpythonthehardway.org/book/ (Basics)
* https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world  (MVC - if you are interested in these)

Many other resources are out there. And yes, python runs fine on windows also...
Thx for the link, will look through these.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Raspberry Pi
« Reply #5 on: April 22, 2017, 06:36:22 am »

Depending on the stack that you use to enable access to the gpios, accessing the pins states (both read and write) can be as easy as a simple filesystem read, because the states are represented on the /sys/gpio device block.

This means that you can easily monitor and control the pins to do a wide assortment of simple tasks, even just from a shell script.
Logged

Reudh

  • Bay Watcher
  • Perge scelus mihi diem perficias.
    • View Profile
Re: Raspberry Pi
« Reply #6 on: April 23, 2017, 12:55:30 am »

A simple and easy project to just get started with how the Pi works would be making yourself an OSMC (open source media centre) system, or something like Retropie chock full of emulators. Neither require insane amounts of technical prowess, have some level of configuration required, and produce a pretty cool little talking point as the end product of the project. Once you make those, you could do something more complex by writing a program in Python. There's a video of a bloke who automated most of his home by singing to it with an ocarina.

heydude6

  • Bay Watcher
    • View Profile
Re: Raspberry Pi
« Reply #7 on: April 30, 2017, 05:13:26 pm »

Personally, I would recommend getting started on an arduino. They aren't as versatile as the PI, but they're simpler and easier to get into. I would recommend the UNO Elego, my version came with a starter kit filled with all sorts of parts and wires as well as an instruction manual that explained how to use each part as well as the programming language. It's honestly not that hard if you read the instructions and know some programming basics.
Logged
Lets use the ancient naval art of training war parrots. No one will realize they have been boarded by space war parrots until it is to late!
You can fake being able to run on water. You can't fake looking cool when you break your foot on a door and hit your head on the floor.

Starver

  • Bay Watcher
    • View Profile
Re: Raspberry Pi
« Reply #8 on: May 02, 2017, 01:48:44 am »

To add my own bit: To just use the Pi, you don't need to go into the GPIO stuff. Power in through a (USB ?mini?1-ended) plug from a standard wall-socket-to-USB arrangement, HDMI video cable out into a suitably-equipped monitor2 and your choice of USB keyboard and mouse3 and it works perfectly fine just off of a suitably pre-initialised SD card.

Add an ethernet connection (network cable, RJ45) to your home network5 and you can even ditch the cable to the monitor and whatever you did for keyboard/mouse and run it through a VNC window on your standard computer (once you have it set up - guides on how to do this available through your standard search engine) leaving just power in, whatever network connectivity it needs and the rest only as you need to for specific other interfaces.

Only when you want to do more than play with the "computer" aspects of the Pi (play the cut-down-Minecraft, mess about with the programming tools, just use its browser to browse the internet, experiment with shell-scripting to capture stills from USB cameras you have plugged into it, etc) do you need to worry about the GPIO and breakout boards that give you the ability to control robotics (of a kind that isn't USB plug'n'play already) and the rest.

And, to echo the last poster, if you're determined to go into electronics stuff (rather than PnPish things that may be an installation/configuration challenge, but not a "which pin do I connect to which transister or relay leg?" one) then get an Arduino (no fancy video output, you typically poke and prod it from your current computer) and a breadboard or other similar development kit to plug components into and wires into/out of.  Not so "instantly use", but mid-way between Pi and a PIC controller board and on the way to the "create your own custom circuit board controller" territory.

You can later combine both Pi and Arduino into one battery-powered whole. Let the Arduino do a lot of the "electronicky" stuff (you can attach more separate servos to an Arduino, even before adding a special polyservo break-out board to it, than your Pi can service on its own) and the "lower level" coding, but with the Pi running as "higher brain functions", possibly with a touch-sensitive LED display 'hat' to it for you to handily interface with. But that's not where you'd start, or necessarily where you'd even finish or be passing through on the way to somewhere else even more technical...

1 I can never remember between Mini and Micro and the like, but it seems like the current standard for smartphone chargers/etc...

2 Depending on your model of Pi, you may be able to get 'Composite video' out of it (phono-style connector) and plug that directly into a suitable monitor/TV input, but it's easier just to go HDMI if you can...

3 To cut down on wires, and use only 1/4 of the USBs4, I have a Keyboard+Mouse pair that wirelessly connect to a USB "how the heck does this essentially flush plug contain a receiver?" dongle.

4 But I don't usually use the other three, and you can always add (ideally powered) USB hubs to the Pi to give it more USB devices to plug in...

5 You can also get Wifi USB dongles, and the newer Pi W has inbuilt wireless capabilities, though I'm not so sure about its other side-ports, such as I've been assuming you have on the 1A,1B and 2 version Pis.
« Last Edit: May 02, 2017, 01:56:30 am by Starver »
Logged

Nightcore Angel

  • Bay Watcher
  • Noice! Now, keel over and DIE!!!
    • View Profile
Re: Raspberry Pi
« Reply #9 on: May 09, 2017, 03:21:09 am »

Hey guys, this has been a while, but i just got the RasPi  :D i also bought a pair of motor, some wires, and an motor control chip (IC L293D). Woo! Im exicited, the possibilities that you could think of to do with this tiny machine... but I think i will to start with something simple first...plus...  :-\ i never used linux before and just started to learn how to, dont worry thou, im going at a slow but steady pace here.
To add my own bit: To just use the Pi, you don't need to go into the GPIO stuff. Power in through a (USB ?mini?1-ended) plug from a standard wall-socket-to-USB arrangement, HDMI video cable out into a suitably-equipped monitor2 and your choice of USB keyboard and mouse3 and it works perfectly fine just off of a suitably pre-initialised SD card.

Add an ethernet connection (network cable, RJ45) to your home network5 and you can even ditch the cable to the monitor and whatever you did for keyboard/mouse and run it through a VNC window on your standard computer (once you have it set up - guides on how to do this available through your standard search engine) leaving just power in, whatever network connectivity it needs and the rest only as you need to for specific other interfaces.

Only when you want to do more than play with the "computer" aspects of the Pi (play the cut-down-Minecraft, mess about with the programming tools, just use its browser to browse the internet, experiment with shell-scripting to capture stills from USB cameras you have plugged into it, etc) do you need to worry about the GPIO and breakout boards that give you the ability to control robotics (of a kind that isn't USB plug'n'play already) and the rest.

And, to echo the last poster, if you're determined to go into electronics stuff (rather than PnPish things that may be an installation/configuration challenge, but not a "which pin do I connect to which transister or relay leg?" one) then get an Arduino (no fancy video output, you typically poke and prod it from your current computer) and a breadboard or other similar development kit to plug components into and wires into/out of.  Not so "instantly use", but mid-way between Pi and a PIC controller board and on the way to the "create your own custom circuit board controller" territory.

You can later combine both Pi and Arduino into one battery-powered whole. Let the Arduino do a lot of the "electronicky" stuff (you can attach more separate servos to an Arduino, even before adding a special polyservo break-out board to it, than your Pi can service on its own) and the "lower level" coding, but with the Pi running as "higher brain functions", possibly with a touch-sensitive LED display 'hat' to it for you to handily interface with. But that's not where you'd start, or necessarily where you'd even finish or be passing through on the way to somewhere else even more technical...

1 I can never remember between Mini and Micro and the like, but it seems like the current standard for smartphone chargers/etc...

2 Depending on your model of Pi, you may be able to get 'Composite video' out of it (phono-style connector) and plug that directly into a suitable monitor/TV input, but it's easier just to go HDMI if you can...

3 To cut down on wires, and use only 1/4 of the USBs4, I have a Keyboard+Mouse pair that wirelessly connect to a USB "how the heck does this essentially flush plug contain a receiver?" dongle.

4 But I don't usually use the other three, and you can always add (ideally powered) USB hubs to the Pi to give it more USB devices to plug in...

5 You can also get Wifi USB dongles, and the newer Pi W has inbuilt wireless capabilities, though I'm not so sure about its other side-ports, such as I've been assuming you have on the 1A,1B and 2 version Pis.
Personally, I would recommend getting started on an arduino. They aren't as versatile as the PI, but they're simpler and easier to get into. I would recommend the UNO Elego, my version came with a starter kit filled with all sorts of parts and wires as well as an instruction manual that explained how to use each part as well as the programming language. It's honestly not that hard if you read the instructions and know some programming basics.
Funny really, i just recently knew what arduino is while i was browsing some chip and sensor for the Pi. Thou i never thought that the 2 could be combined, ill try to do that when my pile'o tresure is refilled.

A simple and easy project to just get started with how the Pi works would be making yourself an OSMC (open source media centre) system, or something like Retropie chock full of emulators. Neither require insane amounts of technical prowess, have some level of configuration required, and produce a pretty cool little talking point as the end product of the project. Once you make those, you could do something more complex by writing a program in Python. There's a video of a bloke who automated most of his home by singing to it with an ocarina.
Im getting onto that, got a 32gb sdcard for me to fill RetroPie, at first i thought those NES case was a joke/bells and whistle for the pi, i was suprised when i discover RetroPie, i totally dig retro games, heck, i had emulators on my phone and computer   :)

Depending on the stack that you use to enable access to the gpios, accessing the pins states (both read and write) can be as easy as a simple filesystem read, because the states are represented on the /sys/gpio device block.

This means that you can easily monitor and control the pins to do a wide assortment of simple tasks, even just from a shell script.
I was also reading on this and wiring tutorials, but i realize that many guides uses the 1st gen of pi which has less pins than the  RasPi3B (the one i bought). I have yet to discover whether every pin is consistent or i can change the function through editing the program, guess i need to experiment on these. I was very cautious regarding wiring the Pi. From what ive been loking into, the Pi is susceptible to current overloading and cpu overheating.

Again, thanks for the help everyone, always wanted to make a robot since i was a kid, back then i tried with lego nxt, but my dad found it to be somewhat unconvincing, then i tried FischerTechnik, was pretty good, but my mentor was...incapable (thats kinda mean to say, but i never learned much from him anyway...), i dropped robotics for a good few years, then kinda got back inspired after seeing what people do with RasPi. Maybe one day, when i made a sentient coffee machine, ill put you guys on the credits  ;D
Logged