C# for Arduino? Mech Major Questions EE/CS

  • Thread starter Thread starter pyroknife
  • Start date Start date
  • Tags Tags
    Arduino
Click For Summary

Discussion Overview

The discussion centers around the programming languages applicable for Arduino, particularly whether C# can be used, and the nature of the programming languages that are typically employed, such as C and C++. Participants explore the implications of using these languages in the context of a mechatronics project.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant questions the feasibility of using C# for Arduino programming, suggesting that it is likely limited to C and C++.
  • Another participant notes that the Arduino programming language resembles a subset of Java, indicating a potential confusion about the underlying languages.
  • A participant references the Arduino wiki, stating that Arduino uses a Wiring-based language similar to C++ and mentions that the Arduino IDE is written in Java.
  • It is mentioned that while the Arduino platform can utilize simplified C, programming directly in C may require specific hardware setups, such as using an ICSP header with a programmer.
  • Some participants express uncertainty about the extent to which C code can be integrated into Arduino projects.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the use of C# for Arduino programming, with some asserting it is unlikely while others focus on the capabilities of C and C++. The discussion reflects multiple viewpoints and uncertainties regarding the programming languages involved.

Contextual Notes

There are limitations in understanding the exact capabilities of the Arduino platform regarding the integration of different programming languages, as well as the specific requirements for programming in C.

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.
 

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
1
Views
4K
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K