ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there any preference between using say a Mac/Windows/Linux to program system level?
I2C, at command, C, etc... in particular plugging in the hardware itself to Linux and assuming the programming software is on Linux nd talks to the board.
I don't have any particular board in mind. But I'd like to work with possibly Arduino, psoc. I know i2c for accelerometers I think and at command for Bluetooth BLE modules.
How, exactly, do you intend to attach an I2C accelerometer directly to a Mac? Or Windows PC? Or a non-embedded Linux machine?
Desktop systems don't expose low level headers for directly attaching I2C/SPI peripherals. You'd need to be using an embedded system (Raspberry Pi, Beagleboard, etc), which 99.9% of the time, if it runs an OS, it will be Linux.
There are adapter boards you can use to translate between I2C and eg: USB, in which case the preference would be whatever OS the adapter board's drivers were written for.
Or am I completely misunderstanding the question?
Last edited by suicidaleggroll; 07-12-2016 at 12:23 PM.
The definitive language for writing the necessary low-level device drivers (unless they already exist, which is quite likely ...) is "C." The driver normally consists of a loadable module.
User-side application libraries, which provide the first interface layer to the driver, are ordinarily written in "C" or "C++."
Higher-level applications can be written in the language(s) of your choice.
And, I repeat: "usually, it has already been done." If not, there will surely be a set of source-code that you can "merely adapt."
How, exactly, do you intend to attach an I2C accelerometer directly to a Mac? Or Windows PC? Or a non-embedded Linux machine?
Desktop systems don't expose low level headers for directly attaching I2C/SPI peripherals. You'd need to be using an embedded system (Raspberry Pi, Beagleboard, etc), which 99.9% of the time, if it runs an OS, it will be Linux.
There are adapter boards you can use to translate between I2C and eg: USB, in which case the preference would be whatever OS the adapter board's drivers were written for.
Or am I completely misunderstanding the question?
Yeah I didn't mean to attach directly to the computer. With Windows you'd have like some program you'd use to program i2c with and then plug the sensor in through USB which I don't think that makes sense what I'm saying (read: I have no experience)
I guess I'll just be sure to have both Linux and windows OS available.
The definitive language for writing the necessary low-level device drivers (unless they already exist, which is quite likely ...) is "C." The driver normally consists of a loadable module.
User-side application libraries, which provide the first interface layer to the driver, are ordinarily written in "C" or "C++."
Higher-level applications can be written in the language(s) of your choice.
And, I repeat: "usually, it has already been done." If not, there will surely be a set of source-code that you can "merely adapt."
Thanks.
I'm working on learning c but I don't use it nearly as often as I do with higher level language/coding so I'm not that great at it.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
There are some programming basics that will be the foundation of everything a programmer does. I see countless multitudes of programmers who skipped the basics and went straight to learning a programming language. They never become really good programmers, unless they get the basics on the job. Programming is something that must be taught. Once you have the basics you can just take off.
C is the defacto standard programming language, because it is an official standard documented as an ANSI publication. It is suitable for almost any task, although a bit laborious.
There are some programming basics that will be the foundation of everything a programmer does. I see countless multitudes of programmers who skipped the basics and went straight to learning a programming language. They never become really good programmers, unless they get the basics on the job. Programming is something that must be taught. Once you have the basics you can just take off.
C is the defacto standard programming language, because it is an official standard documented as an ANSI publication. It is suitable for almost any task, although a bit laborious.
C is definitely the best of the best to start programming. You are free to make your own libs, or use existing libs,... you can even use them later in C++ if you have to. If you know C, you can do many things.
Last edited by patrick295767; 07-16-2016 at 05:21 AM.
It doesn't matter with Arduino boards. You develop with the Arduino editor and download on to the device.
I believe the environment works on Windows and Linux at least.
I have dabbled a little with Arduino, I only use Linux and it works fine.
Arduino uses C.
Buy a starter pack on Amazon and away you go, its great fun and ridiculously inexpensive.
Last edited by bigearsbilly; 07-18-2016 at 02:14 AM.
It doesn't matter with Arduino boards. You develop with the Arduino editor and download on to the device.
I believe the environment works on Windows and Linux at least.
I have dabbled a little with Arduino, I only use Linux and it works fine.
Arduino uses C.
Buy a starter pack on Amazon and away you go, its great fun and ridiculously inexpensive.
Arduino editor is kinda heavy and bloated. But well, no choice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.