C# for Arduino? Mech Major Questions EE/CS

  • Thread starter pyroknife
  • Start date
  • Tags
    Arduino
In summary: It's mainly designed to work with the Processing IDE.The code written in the Arduino software will be compiled and run on the Arduino hardware, however I'm not entirely sure of all the limitations of that.
  • #1
pyroknife
613
3
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
  • #2
C# is proprietary, limited to Windows platforms, so not likely.
 
  • #3
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.
 
  • #4
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?
 
  • #5
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:
  • #6
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.
 

1. What is C# for Arduino?

C# for Arduino is a programming language that allows you to write code for your Arduino microcontroller using the C# syntax. It combines the simplicity and user-friendliness of C# with the power and versatility of Arduino hardware.

2. Can I use C# for Arduino with any Arduino board?

Yes, you can use C# for Arduino with any Arduino board that has a microcontroller capable of running a virtual machine. This includes boards such as Arduino Uno, Mega, Due, and Nano.

3. Do I need any additional software to use C# for Arduino?

Yes, you will need to install the Arduino IDE, which is a free software used for programming and uploading code to Arduino boards. You will also need to install the C# for Arduino extension for Visual Studio or Visual Studio Code.

4. Is C# for Arduino suitable for beginners?

C# for Arduino is suitable for beginners who have a basic understanding of C# and are familiar with the Arduino platform. However, if you are completely new to programming, it may be helpful to start with a simpler language like Arduino's native language, C++.

5. Can I use C# for Arduino to control external devices?

Yes, C# for Arduino allows you to easily interface with external devices such as sensors, motors, and displays. This makes it a powerful tool for creating projects that involve real-time data processing and physical interactions.

Similar threads

Replies
4
Views
1K
  • STEM Academic Advising
Replies
1
Views
890
Replies
2
Views
993
Replies
6
Views
1K
  • Electrical Engineering
Replies
4
Views
1K
  • STEM Academic Advising
Replies
4
Views
1K
Replies
6
Views
2K
  • STEM Academic Advising
Replies
4
Views
1K
  • STEM Academic Advising
Replies
4
Views
2K
Replies
3
Views
1K
Back
Top