Arduinos cost more than a lot of Pis, though. And the network interface of a Pi enables some really interesting capabilities that don't exist, or are harder to obtain, with a device that doesn't have one.
I think ESP8266 boards (running something NodeMCU) are becoming the more popular replacements for Arduino. They're super cheap, and have integrated Wifi.
Cool thing about them is that you can write in C-like AVR code (like Arduino), or micro versions of Lua, Python, and other choices.
4 dollars, including shipping. At this price, they're pretty much disposable. Pi's seem to have bad shipping costs, so they're 20$/piece for the cheapest:
14 GPIO (although with hacks you can do more), including 10 bit DACs on all of them, and 4 with hardware PWM. Most have alternate functions, like I2C, that can be used.
Cool thing about them is that you can write in C-like AVR code (like Arduino), or micro versions of Lua, Python, and other choices.