6 ms·
<rant> In my opinion Arduino and "pro" does not belong in the same sentence. I work as an embedded software engineer who's tasked with ripping all the terrible
by Zagitta 7y ago
<rant>
In my opinion Arduino and "pro" does not belong in the same sentence.
I work as an embedded software engineer who's tasked with ripping all the terrible arduino code out of a fairly large codebase where I work and the arduino core libraries are the lowest quality code I've ever had the displeasure of working with.
It's full of awful decisions everywhere in the arduino core libraries such as defining min and max macros when they're writing C++ code which in turn results in STL includes blowing up if you attempt to use something simple and safe as std::array.
I could go on for days about all the terrible decisions that reeks to high heavens of always taking the path of least resistance...
</rant>
- brainzap 7y agoHow does one write code for arduino?
- HeyLaughingBoy 7y agoEasiest way is to download their IDE (or use the web version) and code in C/C++. 32-bit ones also support Micropython and I think there have been ports of Node.js, but I haven't looked into those.
- geomark 7y agoThere are also block-based coding IDEs. I have taught physical computing to primary school kids using it.
- windexh8er 7y agoCan you shed any light on platforms that are the opposite of your experience with Arduino? I've enjoyed doing a few small projects with PyCom [0] products and have found them good enough for what I was after, however I can stake no claim on it being any better and have always been curious. [0] https://pycom.io/ https://pycom.io/
- ClumsyPilot 7y agoAnd yet Arduino has created an ecosystem of libraries, tutorials, blogs and communities that changed the industry. Now you can program dozens of chips with Arduino core, such as ESP8266/32, etc. If it wasn't for arduino, many project would never take off. At university I was taught to program microchip pic16 and oh boy was it painfull. Their software was low quality, errors were incomprehensible, etc. I think Arduino is Javascript of embedded development: many people use it because it's easier, there is a library for everything and half of them don't work right. Their i2C has had the same issue for like 8 years and last time i checked it still isn't fixed.
- contingencies 7y agoAgreed. Manufacturers that need volume won't touch $100 per item plus the supply chain reliability issues of Arduino distribution. Portenta is therefore, at best, only useful for a niche area of higher processing requirement small volume users. At small volume with assured availability right now you can plug together off the shelf microcontrollers and ethernet modules for $3-5 per node. That's 5% of the Portenta price. What Arduino originally did right was USB flashing + cross platform IDE + library management + examples + media noise. The fact nobody else has bested them is a sad comment on industry.
- dwild 7y ago> At small volume with assured availability right now you can plug together off the shelf microcontrollers and ethernet modules for $3-5 per node. Source? I'm looking for that right now and can't find any cheap microcontrollers that include an ethernet jack. The price I find make a Raspberry Pi a viable solution... which is quite sad.
- contingencies 7y agoNot included. Use external module, eg. ENC28J60 (dominant and open source drivers for ~all platforms) which is cheapest, SPI based and 10M limited. For higher throughput look at Wiznet modules or bigger MCUs with MII/RMII which gets much pricier - with low end MCUs you can't generate or process that much data anyway.
- etaioinshrdlu 7y agoThe IDE is also spectacularly buggy, stagnant, and lacking so many needed features. I'm not even sure to what to attribute arduino's success. I think they just made the simple things (GPIO and loading code to the device) simpler than anyone else. And even that is not done terribly well on an absolute scale. Think about how often new users encountered FTDI driver issues over time...
- captncraig 7y agoA USB bootloader and a standard footprint with a line of addon shields. 10 years ago, the only choices I saw were to buy an uno or get a pic and somehow figure out how to program it with crazy dongles and things. It was an easy choice.
- dragontamer 7y agoIn my experience, Arduinos are really useful as ATMega328pb boards for beginners. Once you're used to the development environment, you "take off the training wheels" and start to program in ATMega328pb directly. Or in this case, use an STM32 ARM 480MHz chip.
- m463 7y agothe software on arduino sucks, the hardware on the raspberry pi sucks. If they could have a kid... Arduino: - crappy software environment, and no networking. (designed by hardware guys?) + wonderful hardware. + The pins are female and don't accidentally short on things. + There are a variety of devices available with the number of pins you need. + Powering the device is simple and straightforward. + Driving different types of hardware is easy. Raspberry Pi: - terrible hardware. (designed by software guys?) - hard to power. Must be 5v, power supply must be carefully chosen, lots of limits. - pins are male. who does this? - hardware arbitrarily (capricously?) changed from release to relase (moved LEDs, etc..) - hard to drive different hardware + software is wonderful. + you can run a variety of operating systems. + you can run really high level software (python, GUI, machine learning, compiler, web server, ... so much more) + networking (all the kinds)
- jrockway 7y agoThat is my impression of the Arduino codebase as well. I think the goals of the project are to say "yes" to every contribution, and to pretend that a sketch can work on every Arduino-compatible piece of hardware. For amateurs, this is all fine. You don't care if the code is good, because you're just making a $60 555 timer. And you want your sketch to work when Adafruit sends you a new MCU in your monthly hacking box or whatever. So Arduino does very well there, because that's what users want. Over in the real world, you pick a board and use that for the lifetime of your project. Going through 8 abstraction layers so you can run your code developed against an ARM M4 on an ATMEGA32U4 is not something anyone cares about. What people do care about is developer productivity, and the Arudino toolchain is just terrible. I'm not talking about the IDE, which is what it is, but the actual mechanics of building and flashing devices. I have a Windows workstation, and the % chance of being able to successfully flash a sketch is about 50%. Sometimes the device switches ports and this confuses the IDE greatly. Sometimes the device just doesn't show up properly. Maybe this is all Windows' fault, I don't know, but I have the exact same problems on Linux. Meanwhile, the same board in UF2 mode works perfectly every time. I can edit Python code against a file sitting on the device, or run "tinygo flash" with a 100% success rate. What am I even getting from Arduino if I can't edit or try my code efficiently? I don't know where it all went wrong, but the arduino-cli manages to be just as flaky, so I think it's just systemic. You glue together an abstraction layer and 1000 flaky vendor-provided tools... and the result is flaky. I think hobbyists tolerate it because they are told that hardware is "hard" (it's right there in the name), so they are perfectly happy to chant magic incantations because they don't know right from wrong. But if you've written software before, you know this is wrong. All the toolchain needs to do is translate C++ to machine code, which I know from writing C++ that can all work quite well. Then the toolchain needs to copy that machine code into Flash memory on the device, and tell the MCU to restart. I know this works quite well too because I've used UF2 programmers and it works every time. Finally, you need to make a virtual serial port to support debugging. My tinygo programs successfully send serial output to my computer 100% of the time. Arduino IDE? 50% on a very lucky day. Mostly I click around hopelessly, crawl around on the floor trying to plug and replug USB devices, press the reset button on the MCU 700 times... and then 30 minutes later I can see my debugging output. What was I working on again? I forget. Anyway, I suppose that none of this is unique to Arduino. I've used Atmel Studio, I've used Nordic's NRF52 dev kit, I've used avr-gcc and teensy-cli... all are bad in their own way, but they do consistently work and don't get in my way. Arduino consistently gets in my way by not doing the basics right consistently. All so my code can run on devices that I don't have. It's not worth it. I am not sure how this appeals to pros. They should hire some actual software engineers and check back in in a year. I'd be happy to try Arduino again.
- curious_one 7y agoSo what should one use if they want to make interesting yet useful products? I am new to this space, and have only heard of Rasberry Pi, MicroPython and Arduino.
- parsimo2010 7y agoI’m not trying to denigrate you, but “real” products produced at moderate scale will source their own microcontrollers/microprocessors, have their own pcb design, and have the BOM cost-optimized. A Raspberry Pi or Arduino is fine for early prototyping and hobbyists, but if you’re going to make a million of something then you aren’t going to stuff a Raspberry Pi in your product unless the ecosystem is one of your selling points. Otherwise, using a Raspberry Pi means that you’re paying for USB ports, Ethernet ports, WiFi, Bluetooth, led lights, header pins, and every other component on the board and your produce probably doesn’t need them all. Including a bunch of components that you aren’t using is just leaving profit on the table.