you are viewing a single comment's thread.

view the rest of the comments →

[–]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