Arduino is just a toy for hobbyists
Now you've gone and made a comparison between a PIC and the Arduino hardware and development environment. A valid comparison would be something like BASIC Stamp and Arduino or PIC and AVR.
it is not approved for industrial applications
That's a funny statement. There is no law regulating what microcontrollers can be used in indistrial applications, so who does it need to be approved by? AVR parts come in packaging and temperature ranges intended for automotive and industrial applications, just like every other semiconductor device.
In fact you can find AVRs similar to what's used in Arduino in all the places you also find PICs: set-top boxes, RC transmitters, oscilloscope front panels, battery chargers, Honeywell thermostats, glucose meters for diabetics, motor controllers, some Logitech devices, KVM switches,
consumer RADAR gun, that stupid Roomba robot vacuum cleaner, some of those trailerable RADAR speed signs that show your speed as you drive by...
Hell there's even a blog dedicated to showcasing consumer and industrial products that
have AVRs inside. Passive infrared motion sensor, satellite broadcast LNB, Sirius Satellite radio receiver, industrial water flow meter, an industrial fan controller...
Sure, the Arduino software development environment is hobbyist, with its lack of debugging and serial bootloader, but so are a lot of PIC development environments. GCC does a fine job of compiling C/C++ for AVR, and there's also the old AVR Studio 4, CodeVision, CrossWorks, IAR, Imagecraft. The hardware debugging (PDI, debugWire, or JTAG) beats the pants off Microchip's ICD2/3 solution and doesn't require a software blob to be installed into the uC.
PIC was a great thing for its time, but architecturally it is quirky, power-hungry, and inefficient. It may still be perfectly great and viable, but neither the architecture nor the toolchain have a leg up on AVR and ARM.
because the C++ compiler is a joke and cannot produce reliable and repeatable code.
You said C++ so I assume you're talking about GCC. This is a rather bold claim that runs counter to all the evidence I have seen. I have to assume that this was a case of garbage-in/garbage-out until you can demonstrate otherwise--I have written a lot of perfectly reliable and repeatable code on AVR with GCC. Atmel no longer maintains their own C compiler and now use GCC exclusively for their ARM and AVR parts. Freescale, TI, NXP, and ST parts are all supported by GCC as well. Maybe the last time you looked into it was 15 years ago?
I have used PIC, Arduino, Motorolla with CodeWarrior etc .... and while Arduino is attractive for the new crowd because it is FREE and relatively simple to sh*t some code in, it is not a reliable professional platform.
I agree with you that Arduino doesn't have any place on the production line, but neither does PICBASIC or BASCOM for that matter. Arduino is, however, much more relevant to the world right now, the hardware is based on a production-ready microcontroller and the software is C at its core. One could dip his feet into the embedded world with Arduino and eventually graduate from their horrible, low-quality libraries and development environment more smoothly than a transition from BASIC.
For a one-off toy project for an on-the-side customer who wants to program something simple for his car, Arduino is not the worst choice (certainly better than Motorolla). But for a marketable product, I'll go with a PIC.
Take this with a grain of salt from a professional programmer.
You keep putting too many l's in Motorola, by the way. Sorry, it's just a pet peeve like those guys who keep getting new
breaks for their
cameros.
Respectfully, I think you keep going back to PIC out of habit and familiarity. I normally write C++ firmware and drivers for products running VxWorks and WinCE7, but I also get paid to write PIC and AVR firmware and the occasional VHDL for FPGAs. I've done projects with soft-core CPUs like MicroBlaze and PicoBlaze, I've done a project with FreeRTOS on a Cortex-M4, I have development boards for most major embedded technologies like Freescale i.MX, Kinetis, ARM9, AVR, PIC, OMAP, MSP430, AVR32, PSoC, Xilinx, STM32, QorIQ. I've written assembly for PIC, AVR, Motorola 68HC, x86. I've worked with embedded Linux on ARM9 and MIPS, FreeBSD on the BBB. I wrote DOS programs in PowerBASIC and TurboPASCAL and I've used all kinds of quirky stupid C compilers on a variety of architectures.
I used to be a PIC fanboy until a trusted friend convinced me to try AVR, and this was long before Arduino existed. I despise Arduino, though lately I am willing to turn a blind-eye to hobbyists who choose to partake. Why the FAA lets these guys fly, I just can't understand
I have seen the future, though, and it is ARM. Why would anyone spend $4 on an 8-bit uC that is slower, has fewer peripherals, and less RAM and program space than a $3 ARM? It's easier to port between STM and NXP ARMs than AVR and PIC, and you can scale your project up from M0 to M3 and M4 as your requirements change without losing so much invested. The debugging capabilities are excellent and the extra available processing power lets you easily run an RTOS and/or spend less time hand-optimizing for that last ounce of performance.
I'm not saying that PIC is worthless, but the only people I see consistently getting excited about it where I work are over 50 and can't stop comparing it to the 8051. Their skills are not fresh and their programs are never more than 500 lines long. They don't want to hang up their Nuvistors and put their tunnel diodes away. They just built another really cool TNC for their C64 packet radio setup. Meanwhile the world is moving onward and forwards, except maybe for OP's mechatronics class.
But a message to the OP:
Look around your school and you will see two types of engineering students: Those who are learning everything they know in school and those who are going above and beyond and taking their projects home. This class and this PIC experience is just another tool in your bag and in no way subtracts from the sum total of your experience. It only adds to your perspective and in that regard is a positive and edifying experience. You can do it with the PIC in class and spend your own time to do it with the RPi or Arduino. You'll just have more experience to compare and you'll be able to make a more compelling and informed argument in favor of your favorite technology when that day comes later.
I started programming in BASIC and I started microcontrollers on the PIC and I have no regrets.