C# for Arduino? Mech Major Questions EE/CS

  • Thread starter Thread starter pyroknife
  • Start date Start date
  • Tags Tags
    Arduino
AI Thread Summary
C# is not typically used for programming Arduino boards, as Arduino primarily supports C and C++ through a Wiring-based language. The Arduino IDE, which is cross-platform and written in Java, allows users to write code that resembles a simplified version of C++. While the ATmega328 chip can be programmed in C, using the Arduino environment simplifies the process with its own bootloader and libraries. Users can incorporate fragments of C code into their Arduino projects, but full programming in C would require a special programmer and ICSP header. Overall, for Arduino projects, C and C++ are the recommended languages.
pyroknife
Messages
611
Reaction score
4
Although I'm a mech major, I feel asking this in the EE section is more approparite or a CS section if there was one.

I haven't had much experiencing with arduino circuit boards and C, C#, or C++ programming. Next semester, I will take a mechatronics class. This will involve considerably programming. There will be a project and I'm thinking of using an arduino.

Do you guys know if C# can be used to program an arduino or is it limited to C and C++?
 
Engineering news on Phys.org
C# is proprietary, limited to Windows platforms, so not likely.
 
I've recently purchased an Arduino and have been going through a set of online tutorials. The language looks and feels like a small subset of Java. Here are the Arduino tutorials that I'm looking at if you're interested. The first six don't require much more than the Arduino, a breadboard, and very basic parts.
 
Borg said:
I've recently purchased an Arduino and have been going through a set of online tutorials. The language looks and feels like a small subset of Java. Here are the Arduino tutorials that I'm looking at if you're interested. The first six don't require much more than the Arduino, a breadboard, and very basic parts.

Thanks. I've talked to a few other people and they said you can use C to program an arduino. Any verification on that?
 
pyroknife said:
Thanks. I've talked to a few other people and they said you can use C to program an arduino. Any verification on that?
According to the Arduino wiki page:
Arduino hardware is programmed using a Wiring-based language (syntax and libraries), similar to C++ with some slight simplifications and modifications, and a Processing-based integrated development environment.
However, in the software section:
The Arduino IDE is a cross-platform application written in Java
From what I've read this morning, it looks like the code is written in a Java language but is compiled under the hood using C++. Sorry that I couldn't be of more help. Perhaps the Arduino forum could answer your question better.
 
Last edited:
Arduino is a platform using Processing language (simplified C) and a customised bootloader.

What you're referring to more specifically is that the chip in it, the ATMEGA328 or variant of Atmel's series can be programmed via C.

However the arduino has its own bootloader that allows you to program with serial and hence through the usb device on the arduino. If you want to program with C, you'll have to do it through the ICSP header with a special programmer.

But anyway, in the arduino software, you can put in fragments of C code in there, however I'm not entirely sure of the extent that you can do with it.
 
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top