News for hackers. Stuff that matters.
Re:Arduino Goes Pro at CES 2020 by Zagitta on Tuesday January 07, 2020 @03:54PM (#21984705)
<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>

Re:Arduino Goes Pro at CES 2020 by ClumsyPilot on Tuesday January 07, 2020 @05:08PM (#21985572)
And 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.

Re:Arduino Goes Pro at CES 2020 by contingencies on Tuesday January 07, 2020 @05:35PM (#21985879)
Agreed. 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.

Re:Arduino Goes Pro at CES 2020 by petra on Tuesday January 07, 2020 @06:51PM (#21986599)
>> The fact nobody else has bested them is a sad comment on industry.

I wouldn't say nobody has bested them.

The real professional Arduino is the Mbed, run by ARM.

It's for professionals, by professionals, and it shows in good quality.

But, you pay for the abstraction - it's inefficient with hardware resources.

Another alternative is modm.io.

It's a modern take on the hardware abstraction layer, claimed to be very efficient.

It may just be that with it's combination of high efficiency and portability, you would get the cheapest mcu for your project.

Re:Arduino Goes Pro at CES 2020 by contingencies on Tuesday January 07, 2020 @06:58PM (#21986652)
I must respectfully disagree based on research conducted within the last 2 weeks. Everyone claims their IDE is the business, in fact all the closed source ones are all crap, poorly documented and only allow you to easily taget a subset of platforms from a subset of development environments. For example, out of the box MBed Studio doesn't support many lower and mid range chips in the STM range. If you want to buy a high end chip with a MAC, it might be a great option (look at their hardware gallery[0] for an idea of what they're clearly targeting). It's apples and oranges. AFAIK most pro's apparently still use Keil, which is Windows only and expensive.

[0] https://os.mbed.com/platforms/

Re:Arduino Goes Pro at CES 2020 by petra on Wednesday January 08, 2020 @02:57AM (#21989315)
// only allow you to easily taget a subset of platforms from a subset of development environments

I'm not sure the mbed is intended for products with a deep focus on price.

So less hardware selection might fit.

But modm.io does have support for some low end devices.

Re:Arduino Goes Pro at CES 2020 by contingencies on Wednesday January 08, 2020 @06:20AM (#21990407)
modm.io looks interesting, thanks. Unsure I agree with the premise that using a value line 32 bit MCU implies a "deep focus on price". To me, that would mean something like EM78P173NSO MDT10P509S11 SN8P25D HR7P155 PMS150C or https://en.wikipedia.org/wiki/Electronic_packaging#Glop-top
Re:Arduino Goes Pro at CES 2020 by dwild on Tuesday January 07, 2020 @06:24PM (#21986390)
> 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.

Re:Arduino Goes Pro at CES 2020 by contingencies on Tuesday January 07, 2020 @06:50PM (#21986592)
Not 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.
Re:Arduino Goes Pro at CES 2020 by dwild on Wednesday January 08, 2020 @10:17AM (#21992123)
Thanks! I didn't know the ENC28J60 could be that cheap. I had seen it in the past but it was always 10-15$ and with a microcontroller, that made it quite expensive. Next time I order a bunch of ESP8266 from China, I will add a bunch of them too.
Re:Arduino Goes Pro at CES 2020 by contingencies on Wednesday January 08, 2020 @03:52PM (#21995656)
To get a sense of realistic prices use 1000 piece quantities quoted on electronic component stockists in Guangdong such as http://lcsc.com (or via https://jlcpcb.com/quote#/parts which is a significant subset thereof) and http://hqchip.com (but avoid the red=import results). For a popular component such as a network module, roughly assume chip cost plus 1-2RMB for the PCB, resistors and socket and assembly. Same approach works for microprocessors.
Re:Arduino Goes Pro at CES 2020 by bsder on Tuesday January 07, 2020 @05:39PM (#21985903)
> And yet Arduino has created an ecosystem of libraries, tutorials, blogs and communities that changed the industry.

Has it, really? I have difficulty finding projects that went from Arduino to major success.

The only thing which (I think) has an Arduino that actually became a "success" is the Formlabs 3D SLS resin printer.

Re:Arduino Goes Pro at CES 2020 by jkestner on Tuesday January 07, 2020 @05:47PM (#21986013)
Few directly to market. How they’ve changed the industry is by empowering non-EEs to prototype products that they can then take to engineers to DFM. I know of, or have built, countless products that started as Arduino prototypes, even if it was just to mock up the user experience.
Re:Arduino Goes Pro at CES 2020 by dmd on Tuesday January 07, 2020 @06:15PM (#21986311)
raises hand I worked on a product (a $150000 medical device) where I started out using an Arduino, but eventually replaced it with a ATmega.
Re:Arduino Goes Pro at CES 2020 by mkeeter on Tuesday January 07, 2020 @06:28PM (#21986421)
Nope, no Arduino involved! The original Form 1 and 1+ used an STM32F103. Some of the firmware used libmaple [1], which exposes an Arduino-ish API, but most of the code was low-level C and C++.

(I'm an electrical engineer at Formlabs, and was around through the Form 1+ product cycle)

[1] https://github.com/leaflabs/libmaple

Re:Arduino Goes Pro at CES 2020 by mclightning on Tuesday January 07, 2020 @06:36PM (#21986494)
I think the whole Reprap project, thus cheap 3d printed market was triggered by Arduino....
Re:Arduino Goes Pro at CES 2020 by m463 on Tuesday January 07, 2020 @09:26PM (#21987686)
the 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)

Re:Arduino Goes Pro at CES 2020 by windexh8er on Tuesday January 07, 2020 @04:48PM (#21985300)
Can 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/

Re:Arduino Goes Pro at CES 2020 by dragontamer on Tuesday January 07, 2020 @06:17PM (#21986328)
In 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.

Re:Arduino Goes Pro at CES 2020 by etaioinshrdlu on Tuesday January 07, 2020 @05:08PM (#21985580)
The 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...

Re:Arduino Goes Pro at CES 2020 by captncraig on Tuesday January 07, 2020 @05:18PM (#21985702)
A 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.
Re:Arduino Goes Pro at CES 2020 by curious_one on Tuesday January 07, 2020 @10:14PM (#21987934)
So 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.

Re:Arduino Goes Pro at CES 2020 by parsimo2010 on Wednesday January 08, 2020 @12:33AM (#21988642)
I’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.

Re:Arduino Goes Pro at CES 2020 by brainzap on Tuesday January 07, 2020 @04:44PM (#21985255)
How does one write code for arduino?
Re:Arduino Goes Pro at CES 2020 by HeyLaughingBoy on Tuesday January 07, 2020 @05:44PM (#21985979)
Easiest 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.

Re:Arduino Goes Pro at CES 2020 by geomark on Tuesday January 07, 2020 @06:25PM (#21986398)
There are also block-based coding IDEs. I have taught physical computing to primary school kids using it.
Re:Arduino Goes Pro at CES 2020 by jrockway on Tuesday January 07, 2020 @09:47PM (#21987805)
That 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.