RasberryDoughBoy
Posts: 2
Joined: Fri May 22, 2015 9:18 pm

I want to start my 1st rasberryPi project

Fri May 22, 2015 9:31 pm

Hi RasberryPi Forums!

I've been programming for a while now ( started off back in 2008 when vb.net 08 was out ), moved to Web development (php , html , css, javascript, etc..) and decided I wanted to go back to software development and started learning C/C++ & ASM. The thing is though, I only know the basics of C/C++ , and I don't know anything in regards to ASM ( didn't put enough time into learning it)

But now I have a project Idea I want to work on, and need to know what DIrection i need to go in in regards to
1) Programming language to use (I would assume ASM? if not then c/c++?)

2) Based on what I want to do, should I make my own Operating system (Command Line based) or use a linux operating system and code my own application.

3) Links an resources that can help me when it comes to RasberryPi OS development & networking.

My project is going to be like a "KeyVault" safe system.
The idea is , someone with internet access will goto a website, and place "information" into the database. This information can be anything at all, but once it hits the database, its encrypted. So now a hacker can't read the important information on the database, and the website script doesnt have the ability to decode it. (For example..)

So now I want to use the rasberrypi to connect to the internet, retrieve the encrypted database, > Then the rasberrypi will decode and display it on the RasberryPi Screen.

I don't plan on this taking a few days to make. Honestly I don't expect it to be done for another 6 months at least. This is more of my "Long Term" goal when it comes to working with the rasberrypi and its something I would really love to accomplish. (Note: I dont expect my rasberry pi project to be used on a practical level or on an a daily everyday use type system. I just want to do it, because the idea to me seems hella cool.)

ghellquist
Posts: 68
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: I want to start my 1st rasberryPi project

Sat May 23, 2015 8:24 am

Use raspberry as operation system.
--> rationale: implementing tcp/ip with trimmings such as ssh needed to access the internet takes at a guess 100.000 lines of code, already there

Select a high level programming language, not ASM
--> never program in ASM unless you really love it (few do) or absolutely need to (quite seldom nowadays).

Select one language and go with it.
--> C/C++ is a possible choice. Given the list of languages in your query, I might say javascript. Check out node.js as a "framework" for creating web applications.

Never store very sensitive data in your homebrewed solutions open to internet.
--> the hackers are better at cracking than we normal people are at hiding.

Have fun!
--> learning and doing is fun.

// Gunnar

ghellquist
Posts: 68
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: I want to start my 1st rasberryPi project

Sat May 23, 2015 8:29 am

Second post:

My project is going to be like a "KeyVault" safe system.
The idea is , someone with internet access will goto a website, and place "information" into the database. This information can be anything at all, but once it hits the database, its encrypted. So now a hacker can't read the important information on the database, and the website script doesnt have the ability to decode it. (For example..)

If all you want to do is to get the thing working, you don't need any programming at all. Encrypting and decrypting information is quite safe using PGP.

// Gunnar

RasberryDoughBoy
Posts: 2
Joined: Fri May 22, 2015 9:18 pm

Re: I want to start my 1st rasberryPi project

Sun May 24, 2015 5:41 am

Alright, so now should I install an Operating system like Fedora / NOOBS / Raspian?

and program C/C++ onto it?

Would you be able to point me in the direction of what IDE / Compiler(s) I will need to make doing this easier.

What OS should I use like stated above? (Or which one is more programmer-friendly? / Great for the raspberry pi)

And to actually coding the raspberry pi,
Im assume I'm going to load the OS into a VM, and code it there + compile, then load it over to the raspberry pi storage and test it there. Or is that wrong?

Also, what is different about coding C/C++ on linux vs windows? (Same with any other language ?) , how much different do the librarys get? Or are they the same? If not, is there documentation like a linux "msdn" ?

What are some good tutorials to get used to coding c/c++ on the raspberry pi with a pre-loaded OS?

And anything else that you think I should know.

ghellquist
Posts: 68
Joined: Thu Aug 02, 2012 8:47 am
Location: Stockholm Sweden

Re: I want to start my 1st rasberryPi project

Sun May 24, 2015 8:02 am

RasberryDoughBoy wrote:Alright, so now should I install an Operating system like Fedora / NOOBS / Raspian?

Yes. It saves you a few years of frustrating hard work in order to get anything at all running on the Pi.
RasberryDoughBoy wrote:and program C/C++ onto it?
If you want to, yes. Personally I like to go a bit more "high-level" as to languages and functions whenever possible. Saves as a lot of my time.
RasberryDoughBoy wrote:Would you be able to point me in the direction of what IDE / Compiler(s) I will need to make doing this easier.
The C/C++ compiler with tools is part of raspbian, as with any linux distribution. Learn those and you can program on just about any Linux system. IDE-s might help or hinder, taste differs. Eclipse is one choice, works well on a modern PC, but might be very slow on a PI (never tried). Hard-core people use their favourite text editor and stays away from IDE-s.
RasberryDoughBoy wrote:What OS should I use like stated above? (Or which one is more programmer-friendly? / Great for the raspberry pi)
Download the NOOBS image to a memory card, start the installation process and select to install Raspbian. Raspbian is the "standard" OS on the Pi and as such has the most support. It is a Linux distribution, derived from Debian with just about every function in the Linux world available.
RasberryDoughBoy wrote:And to actually coding the raspberry pi, Im assume I'm going to load the OS into a VM, and code it there + compile, then load it over to the raspberry pi storage and test it there. Or is that wrong?
It is quite possible to code directly on the PI. Connect a screen and keyboard and run any of the several editors available. Compile using make and cpp, manage source code using git and so on -- the pi is just lika any linux computer in that regard.
If you want to do development on another computer, it is still best to do the final compilation and linking on the PI to avoid the work of setting up a cross-compile chain as the pi has a different CPU (ARM) compared to PC-s (Intel). Connect the PI to your LAN and setup file access, then the Pi storage will look like any other catalog on your PC.
One idea is to install a debian derivative linux (google is your friend) in a VM on your main PC and develop there. Once the code is running, simply copy it to the PI and compile it there. C/C++ code is mostly portable, and the libraries are the same.
RasberryDoughBoy wrote:Also, what is different about coding C/C++ on linux vs windows? (Same with any other language ?) , how much different do the librarys get? Or are they the same? If not, is there documentation like a linux "msdn" ?
Well,it is similar, and different. Most of the networking functions are very similar between linux and windows, but all of the user interface stuff is quite different. If you want to program for Linux (as raspbian is), I strongly suggest that you stay away from any and all C/C++ programming on windows, at least until you reach expert level.
RasberryDoughBoy wrote:What are some good tutorials to get used to coding c/c++ on the raspberry pi with a pre-loaded OS?
Sorry, google is your friend here. As pi with raspbian is a linux computer, search for tutorials on that.
RasberryDoughBoy wrote:And anything else that you think I should know.
[/quote]
Start now by installing raspbian, write a small "hello world" c-program, compile and link it.

Return to “Networking and servers”