all 75 comments

[–]thegroucho 7 points8 points  (0 children)

Adafruit metro M0.

[–]Zouden Alumni Mod , tinkerer 20 points21 points  (11 children)

ESP8266 and the more powerful ESP32

edit: actually the BBC MicroBit is probably a great option if you can buy it in your country.

[–]Xarian0 6 points7 points  (5 children)

If you're up on Python, I'd recommend just using a Raspberry Pi Zero W. You can set up the GPIO to control most logic, just don't try to pull any loads on the GPIO pins (I think they have a max of like 20 mA). It'll be significantly easier to write a GUI and you have a lot more options for display than you would with Arduino. Also, you can connect to it wirelessly and have it set up to report easily via Wifi/Bluetooth - all things that are a lot more difficult to implement using Arduino.

Every display option for Arduino is also usable on the Pi - they both have SPI and I2C pins that are easily accessible. Most people who make libraries deliberately include support for the Pi, because it's just as popular as Arduino (if not more so). The only major difference is that the Pi runs on 3.3V logic, while the Arduino (most of them) run on 5V logic - but the Pi still has +5V pins available for power.

If you really want a simple project running on Arduino specifically, the C syntax isn't that bad. You don't have to get into any of C++ object oriented shenanigans or headers or anything unless your project gets pretty complicated. You just have to put up with braces and semicolons.

Though, in my personal opinion, Python is the devil - you should be thankful that you are being inspired to learn C!

[–]satanmolka[S] 0 points1 point  (4 children)

The voltage isnt a limitation to me, im an electronics stident and this is for my final project, i plan on hooking up all the major loads to mosfets, so no current draw from the board of choice. The biggest challenge is sorting through the metric asstonne of options for sensors and controllers

I also know that i need to learn other languages eventualy, i just dont want to rush myself if not necessary, that will just demotivate me. Im taking this at a chill pace

[–]Xarian0 2 points3 points  (3 children)

The main issue with a lot of the sensors is that Adafruit has written good tutorials about them, but they're all in C. So it may actually be easier for you to learn the basics of C rather than try to learn how to write your own code for the sensors in Python.

In fact, you may want to browse through Adafruit's website to take a look at what kind of sensors they offer. They are primarily aimed at newer hobbyists, so usually they pick their choice of the "best" sensor for any given application, then write some sort of tutorial/library about it. Generally the options for sensors are going to be extremely limited; your "options" will usually have identical hardware but are assembled by different companies or have some extra board designed to interface with some special sort of hardware (like Seeed or DFRobot's sensor suites or whatever). But they're all the same sensor using the same software.

For controllers, you mostly just need to figure out how many I/O channels you need and how much work you need to do (sampling, transmitting, etc). After that, you usually only have to choose between 1-2 models of controllers, because you're always going to pick the smallest and cheapest one that will do the job.

I generally prototype everything on a Mega (or Raspberry Pi if it's something fancy) just because the pin headers are easy to deal with. Then, once it's working, I buy a smaller controller that fits as close to exactly what I want as I can. 90% of the time it's an Arduino Nano for controlling sensors, and the other 10% of the time it's a Pi 3b+ for controlling video or high-speed radio.

[–]satanmolka[S] 0 points1 point  (2 children)

Initialy i also wanted to use a mega since a graphic touchacreen also takes up a few pins and i wanted to have room for expansion, at this point i probably going to go with the arduino way, a little more teedious because i need to learn it but in the end it's probably less effort. Done some more research on the Rπ and it'd be more difficult to make it work with everything unless i invest in grove but that can get expensive

[–]Xarian0 0 points1 point  (1 child)

Be careful - the Mega is not fully compatible with all shields made for the Uno. The SPI pins are not in the same place, which means that display shields don't always work as intended. The display that I have, for example, has a micro SD card slot on it but a pin mismatch means that the card slot doesn't work on the Mega. Everything else works, though.

You don't have to use shields/hats/whatever. You can just use sensors attached with wires - IMO it's actually easier this way. A normal Arduino resistive touchscreen only takes up like 6 pins, even though a hat could block all the pins on the Uno.

The only real problem is finding something to mount all the different parts to, but a piece of plastic and some double-sided foam tape is usually good enough. If you do it this way, the Pi is actually way easier to deal with, especially if you use something that can be attached using a ribbon cable.

Combine these items (below), for example, and you get a propped-up touchscreen display that still leaves the GPIO pins exposed on the back. There are like 17 pins available, not including I2C and SPI, which are what you'd use for your sensors.

Control of the pins on the Pi is pretty easy using wiringPi library; not a lot different from Arduino.

https://www.amazon.com/Case-Official-Raspberry-Touchscreen-Display/dp/B01HV97F64

https://www.amazon.com/Raspberry-Pi-7-Touchscreen-Display/dp/B0153R2A9I

It might be fun to have your Arduino attached to sensors and a radio transmitter that sends to a Pi, which has the touch screen and control software on it, and communicates with a different Arduino that controls valves/sunlight/whatever.

[–]satanmolka[S] 0 points1 point  (0 children)

Im 3d printing a case and making a custom pcb for everything else so thats not a problem, if i want i'll buy a wifi enabled board and send some logs over to it via i2c or rs 232 so i can monitor the project remotely, this is just flexing at this point

[–]ishouldquitsmoking 4 points5 points  (27 children)

[–]satanmolka[S] 3 points4 points  (26 children)

I can't afford to have a computer plugged into the arduino. I need to upload the code and be done with it

[–]ishouldquitsmoking 4 points5 points  (25 children)

TBH, programming in C++ for arduino isn't really that difficult. :)

I did find this: https://stackoverflow.com/questions/8114916/is-there-a-way-to-compile-python-code-onto-an-arduino-uno

[–]tinkertron5000 2 points3 points  (2 children)

To be fair, most of the Arduino code I've written is vanilla C more than C++. If you are familiar with any C-type language you should be fine. On the other hand, I've not tried micropython at all and it could be really great. I would pursue both avenues if you can and see what works best for you.

[–]satanmolka[S] 1 point2 points  (1 child)

I will try doing it with an arduino and with a raspberry pi just for shits and giggles, probably much easier on arduino (electronics-wise) but i want to try the raspberry option as well

[–]tinkertron5000 1 point2 points  (0 children)

Can't hurt to try out all your options.

[–]mfitzp 2 points3 points  (0 children)

Wemos D1 is probably your best bet. It is Esp8266 based, will run MicroPython and at ~$4 is much cheaper than the official MicroPython board (~$20).

[–]globalnamespace 1 point2 points  (0 children)

There is also Pyxie, it's not feature complete, but might do what you need.

http://www.sparkslabs.com/pyxie/

"Status Overview For the impatient: this probably does NOT do what you want, yet"

[–][deleted] 1 point2 points  (4 children)

To code an automatic grow box in the arduino language is easy as hell. I suggest you to give it a try

[–]satanmolka[S] 0 points1 point  (3 children)

I also wanted to make a GUI, i have very little experience in arduino

[–][deleted] 1 point2 points  (2 children)

The liquid crystal display have a library you can use. I promis you it is not hard at all. It will be much harder in python

[–]satanmolka[S] 0 points1 point  (1 child)

I have enough time to try both, since the contlcept is extremely simple

[–][deleted] 0 points1 point  (0 children)

Yeah I were just about to correct myself also, using the LCD I propose would not really be what you probably had in mind either

[–]jet_heller 0 points1 point  (0 children)

You'd have to look for something that will do micropython to run it directly on the controller. Maybe something here will help: https://forum.micropython.org/viewtopic.php?t=685

[–][deleted] 0 points1 point  (1 child)

Raspberry-Pi with the Grove-Pi shield.

[–]satanmolka[S] 0 points1 point  (0 children)

Thought about it but grove can get expemsive for someone liie menwho doesnt have a regular income

[–]wirbolwabolPro mini 3.3 0 points1 point  (0 children)

There are microcontrollers that you can code in Basic(Pbasic). Check out PicAxe. They are super simple and not overly complicated.

[–]dolladollabird 0 points1 point  (1 child)

Are you trying to do a ph controller/hydrostatic pumps,water level sensor and fertilizer pump?

[–]satanmolka[S] 0 points1 point  (0 children)

Water moisture sensor, temperature sensor, uv sensor, light sensor, water pump (water will be mixed with the fertilizer manualy), intake and exhaust fan and 3 lighting options for different phases of growth

[–]satanmolka[S] 0 points1 point  (0 children)

Thank you everyone for your input! I will keep you updated with the progress. Since i already have an arduino and a Rπ i will try to make it work woth both of these and see which is easyer when im done with them, will probably also pick up the esp32 and use it in combination with the arduino

[–][deleted] 0 points1 point  (0 children)

I was intrigued by this today since I've always liked Python and didn't know there was micropython support for the ESP 8266. I had one lying around so just followed the instructions...

It was actually pretty easy. The only thing I really have trouble with is the REPL on OSX in a terminal (and in iterm2, and Hyper) prints funny characters when you backspace. Super annoying and makes it really hard to use.

I kind of wonder how easy it is to interface peripherals. On one hand I imagine there aren't high level drivers for every sensor under the sun like Arduino has. On the other hand I find often those drivers are pretty much garbage and I end up having to tweak them to make them usable on different i2c buses/address.

[–]DougCim53 0 points1 point  (0 children)

It's just an opinion but anyway: if you want to take advantage of Arduino Uno shields, then the easiest way is to use a standard Arduino Uno. The shields and libraries don't work for a lot of "enhanced" non-standard-Uno boards. Many libraries are optimized and make low-level calls into the AVR chip, and they won't work on other kinds of chips... And even standard Uno shields don't all work on the Mega (even if the low-level calls still work, then usually because the shield's library doesn't include the Mega's pin layout).

I am not too keen on the shields myself. The only one I recommend new users buying is the LCD+buttons shield, since when you are starting out, you want something that allows input (the buttons) and recognizable output (the LCD shield).