C LANGUAGE OR PYTHON

Hi, I want to build a automated greenhouse !!

I'm hesitating between C language or Python

what do you suggest

You don’t have a choice. Arduino’s run on C++ only. If you want to run Python, you’ll need a RPi.

Power_Broker: You don’t have a choice. Arduino’s run on C++ only. If you want to run Python, you’ll need a RPi.

So, you do have a choice. Is that what you are saying?

No third parties that have created a python thing for Arduino.

There is a third party scratch like system for Arduino.

boylesg: No third parties that have created a python thing for Arduino.

Third of Five, there are MCU's that do use some Python...

For example: Adafruit CircuitPython

endorphine16: Hi, I want to build a automated greenhouse !!

I'm hesitating between C language or Python

what do you suggest

I'd suggest C language with an Arduino.

There's a very wide range of modules with libraries for Arduino that are suitable for measuring stuff like temperature, humidity and for driving steppers and servos (if you want to open ventilation).

However, if you are thinking of some nice TFT Touchscreen control thing, you'd need a Pi or something for that.

A more personal opinion is that C is a much more suitable language for embedded control applications. (I won't say what I think of python)

Yours, TonyWilk

TonyWilk: A more personal opinion is that C is a much more suitable language for embedded control applications. (I won't say what I think of python)

Let me put a toe in that water ...

Python is good for everything else :)

...R

I would suggest that you get an UNO. get some sensors and some relays and start having some fun.
there are tons of people who have done that so getting something working is not hard.

if you chose to leave the control bits in the greenhouse and you want some fancy display panel, you can always do something.

on another note : what is your background and what is your stronger programming language ?

Robin2: Let me put a toe in that water ...

Python is good for everything else :)

Agreed. Use Python where you can. C/C++ where you must (such as programming an Arduino or other microprocessor).

endorphine16: Hi, I want to build a automated greenhouse !!

I'm hesitating between C language or Python

what do you suggest

There are modules supported by the Arduino environment that will also run MicroPython such as;

ESP8266 ESP32 micro:bit STM32F4

So there is a choice, but which way to go rather depends on whether you are treating this as a learning project or you want to be able to mostly use ready written code.

Just about everything you might need for an automated greenhouse will already have been done, code written and documented in Arduino, unlikely to be the case for MicroPython.

It seems Adafruit is betting hard on CircuitPython, leaving aside Arduino/C/C++ way. Maybe it's the future and we haven't noticed

q2dg: It seems Adafruit is betting hard on CircuitPython, leaving aside Arduino/C/C++ way.

So?

q2dg: Maybe it's the future and we haven't noticed

Or maybe Adafruit isn't part of the future.

I'm not taking one side or the other here, but I don't think that as Adafruit goes so goes everything.

q2dg: It seems Adafruit is betting hard on CircuitPython, leaving aside Arduino/C/C++ way. Maybe it's the future and we haven't noticed

Or just maybe CircuitPython is no more than an attempt to get people dependant on Adafruits products.

endorphine16: Hi, I want to build a automated greenhouse !!

I'm hesitating between C language or Python

what do you suggest

Its really very simple.

If you know the sensors and controllers you are going to use in advance then just check if there is library code and examples available for the specific version of MicroPython you want to use versus Arduino.

If you have the programming skills and time to write your own libraries then it really makes little difference which path you choose.

Oh and one more point of view. Go to the RP forum and ask for help there. Compare which Forum offers more help

endorphine16: what do you suggest

Arduino sketch files are C++ [moderator edit] based. So if you're considering arduino, then go C-based.

A question is ...... do you know how to do some programming in either or both of these languages?

If a person is reasonably familiar with programming in any of the common languages then it will not be difficult to write code in one of the other common languages. Most of the concepts will be common even if they use different names for them.

If somebody is a complete beginner and wants to start learning programming for Arduinos then it seems sensible to learn C++ first.

If a person was a beginner starting to learn to write a PC program I would recommend Python. Python has lots of advantages as an interpreted language but I can't see how they would be useful on a microprocessor that is slow and has very limited memory compared to a PC.

...R

Delta_G:

It seems Adafruit is betting hard on CircuitPython, leaving aside Arduino/C/C++ way.

So?

Maybe it's the future and we haven't noticed

Or maybe Adafruit isn't part of the future.

I'm not taking one side or the other here, but I don't think that as Adafruit goes so goes everything.

I've got some Adafruit boards that run CircuitPython (Trinket M0, ItsyBitsy Express and Feather M0 Express.) I played with CP, and determined it wasn't for me. But you know what? I can also program all of them in C++. Just because Adafruit champions their version of Python doesn't mean they have walked away from the defacto language for Arduino.

I mean my favorite language is FORTH. Does that mean I'm going to forgo programming Arduino in C++?

No it does not.

I can offer some other comments.

you will have your soil moistiure sensor up and running your temperature/humidity/pressure sensor up and running a relay to turn the hose on and off.

before you have downloaded, put on SC card and got the Rpi up and running even to start to program.

Of course, I picked 3 things that are almost plug and play with Arduino.

As we mentioned, (I believe) the ESP8266 has wifi and you can do all the above with your ESP8266

you can then send that data to the Rpi for whatever interaction of internet you like. because the Rpi is better suited to the human interface whereas the Arduino is better suited to the hardware interface.

lastly, and this is something I do not have experience with, but there are lots and lots of discussion about which SD cards last longer, as in the RPi burns them out in a few months.

If a person is reasonably familiar with programming in any of the common languages then it will not be difficult to write code in one of the other common languages. Most of the concepts will be common even if they use different names for them.

+1 Focusing on the language used detracts from more important skills you need as a programmer.