C# for Arduino? Mech Major Questions EE/CS

  • Thread starter Thread starter pyroknife
  • Start date Start date
  • Tags Tags
    Arduino
Click For 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.
 
Thread 'I thought it was only Amazon that sold unsafe junk'
I grabbed an under cabinet LED light today at a big box store. Nothing special. 18 inches in length and made to plug several lights together. Here is a pic of the power cord: The drawing on the box led me to believe that it would accept a standard IEC cord which surprised me. But it's a variation of it. I didn't try it, but I would assume you could plug a standard IEC cord into this and have a double male cord AKA suicide cord. And to boot, it's likely going to reverse the hot and...

Similar threads

Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
1K
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K