arduino ide alternative

 


 
The atmega328 P microcontroller offers a lot of useful features while being easily programmable through the Arduino IDE. I even made a few videos about how to use them. There is how much I enjoy working with them, but sometimes at least for me, you notice its limitations. Maybe the 10 bit resolution of the ADC will footage steps of around 4.9 milli volts at five Foods is not precise enough or the maximum 8 bit PWM frequency of 62 point 6 kilo. Hertz is not fast enough or you need more than two external interrupt pins for your project. That is why, in this video, I will introduce you to this development board, which is also known as the blue pill. Its heart is. The stm32 were f103 c8. T6. 32. Bit arm microcontroller and it can be bought from China for only 2 and best of all can be programmed through the arduino ide. So let’s not waste any more time and find out what advantages and disadvantages this board offers in comparison to the traditional arduino. Nano pro mini let’s get started Music. This video is sponsored by jl CPCB upload, your java files for review and then order high quality PCBs for ridiculously low prices, currently even were free shipping and turn your project into real products to program the microcontroller we need to. Firstly, connect it through its micro, USB port to power source and grab an USB it to serial converter breakout boards after selecting its 3.

3 volt modes. Since the stm32 operates at 3.3 volts voltage levels, we can connect its ground, pin to ground its TX, pin to the a 10 pin and it’s rx pin to the a 9 pin and as soon as the converter is connected to a computer, we can start the Arduino software at this link to the additional ports manager, URLs and install the stm32 f1x exports library through the bots manager. As a first example sketch I created the simplest code, I could think of an LED blink sketch. The only difference in comparison to the traditional Arduino programming so far is the pin name which are all named according to the silkscreen on the development boards and after I connected an LED with resistor between the selected pin and ground, I changed the boot zero jumper to One and selected the here shown settings and the tools options in order to upload the sketch successfully. As you can see, the uploader code does work without a problem. But what is important to note is that when the microcontroller resets, its program gets erased, unless, of course, you change the boot zero jumper back to zero before resetting or repowering the board for more demanding tests, let’s try out the digital reach and the serial output function, Which pretty much follow the same programming language we are used to and after uploading the codes and connecting the selected pin to 5 volts or ground, we can see on the serial monitor that everything works fine, but wait a minute.

I connected it to 5 volts, even though this is a 3.3 volt system. The reason is that a couple of pins are fifl, tolerant, while others are not, and by the way this pin. Our diagram was a great supports when working with the board, but anyway. Another awesome feature is that the inputs not only offer integrated pull up. Resistors like the Arduino does, but also integrated, pulldown resistors and with the digital inputs. Out of the way, let’s try something a bit more complicated like PWM. The difference this time is that we must declare the utilized, pin as PWM and use the PWM write function. The analog write function would still work, but it would only offer an 8 bit resolution. Like the Arduino, while the PWM write function, offers a resolution of 16 bits. That is a difference of two hundred and fifty five steps to 65535 steps, which can often be quite useful. And if you’re wondering, where got all this information from then look no further than the leaf labs documentation there pretty much every necessary feature and function of the blue pills. Programming is very comprehendible explains, but getting back to topic after uploading the codes and connecting the pen to the oscilloscope, we can observe the PWM signal, but sadly its frequency was only around 549 Hertz. The problem is the timer one who’s responsible for the pin and thus the PWM signal in order to change its pre scalar to one and thus speed the PWM signal upper bits.

I added lines to the codes according to the leaf flaps documentation uploaded its and realized that this only improved the frequency bits. The still remaining problem is that the timer register counts up to a value of 65535, while the clock frequency of 72 megahertz would represents one seconds. Thus, by dividing 72 megahertz by 65535, we would get a frequency of 1098 Hertz, which is basically what we measured before. So the solution is to simply the 16 bit timer aka Overflow value to something like an 8 bit value and adjust the PWM write value accordingly. After uploading, we now got an eight bits, PWM signal, just like the Arduino, but with an increased frequency of 281 kilo. Hertz and by pushing the timer to the maximum, we could even get a PWM signal with a frequency of 36 megahertz, but speaking of timers, how about creating timer interrupts? Well, I have to say by once again utilizing the leaf flaps documentation. It was even simpler to implement a precise one. Second compare interrupts, then with the traditional Arduino programming and as you can see, it also works like a charm. You only have to be careful when using the same time up on interrupts and the PWM signal. That usually does not work out very well. Next let’s add a potentiometer to one of the 10 analog in pins and create a simple sketch that outputs, the converted analog value to the serial monitor. Once again, the only difference is the Declaration of the pin.

The rest is the same as with traditional Arduino programming and after uploading we can adjust the potentiometer to output values through the serial monitor between zero and 4095. This range of values represents a 12 bit resolution, so voltage steps of 0.8 milli volts instead of the usual ORD. We know steps of 3.2 million due to its 10 bit resolution. Finally, let’s set up an external interrupts which, once again due to the given documentation, was super easy to implement and if you’re wondering why exactly pin pa1 then there’s no particular reason for that. Since all of the pins feature, the external interrupt function, which, according to this table, should give us a total of 15 external interrupt pins instead of only 2 of the arduino. Now, of course, the Adri also offers pin change interrupts on all of their opens, but they are not as fast and easy to use and after uploading, the new code to the stm32, the external, interrupt routine seems to also work without a problem. So let’s come to a conclusion. The blue pill offers more memory. More eye opens more Peter Frampton’s, more timers, more ADC channels, more external interrupts pins and a couple more features were also providing an overall high resolution and speed programming is even simpler than traditional Arduino programming, and you can work with variables with a length of up to 64 bits the only big disadvantage is that not all Arduino libraries are compatible or ported over yet, but you can always look for advice on the stm32.

Do we know forum so for me, this development board is an awesome, Arduino alternative for more demanding projects.

 
 

arduino ide alternative Video

 

 

 

 

 

 

arduino ide alternative news

 

 

 

 

 

 

 

arduino ide alternative Social

 

 

 

 

official.arduino
2019-10-02T19:32:52+0000

👋 Want to bring Tony Stark-like gesture control to your projects? Learn how with the BLE-enabled MKR WiFi 1010 and Nano 33 BLE Sense boards using the ArduinoBLE library.
safe image.php?d=AQDyi1ELcW4VGzhx&w=720&h=720&url=https%3A%2F%2Fhackster.imgix.net%2Fuploads%2Fattachments%2F997327%2Fblob dChOhNMmeF - arduino ide alternative
official.arduino
2019-10-02T19:08:01+0000

Arduin-yo ho ho! A fairground favorite, the pirate ship is a fun way to explore the oscillation of a pendulum. How much fun, you ask? Access our Science Kit Physics Lab preview and see for yourself: http://bit.ly/2oC6L0Q

🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr

70537898 550174072395145 8798850142103928832 n.jpg? nc cat=102& nc oc=AQmCfMPwMf1oPpYqFhzbxfnGdbrmsjZXrEEBy1ox5Z8EJtiYMADoFNZ5mnSNRgCCY74& nc ht=scontent - arduino ide alternative

 

 

(Visited 31 times, 1 visits today)

About The Author

You might be interested in

Comment (26)

  1. Great video! Here are some points you forgot to mention :
    – The blue pill runs at 72MHz, versus a lousy 16 for the arduino.
    – Development can be much faster if you use the Maple Mini bootloader. You flash it once, and then it gets programmed simply through the USB port (just like the arduino). Note however that they acheive this feat in a very different way, the STM32 way is better (see next point).
    – The blue pill has a USB port straight to the STM32, thus avoiding Arduino’s USB/serial chips. It also means that you’re free to make a USB peripheral with it. For example, it can enumerate as a HID device (usb, mouse, …), COM device (virtual serial), etc…
    – The STM32 is a 32 bit ARM CPU, while the Pro Mini/Micro is an 8 bit AVR. This is not a huge selling point, but can be quite useful if you’re making extensive use of interruptions with shared large variables.
    – SWD interface is exposed (which is standard ARM reduced JTAG), and you can find probes for it on ebay for $2 (just look for ST-Link). This allows for a much better debugging experience, including standard GDB, step by step, registry probing, etc

    1. @Undefined Lastname do you do anything with DSP libraries? do you have difficulty getting support for different boards? it looks so confusing. are you using CubeMX or anything?

    2. pepe6666 I haven’t had a need for any dsp, unless you mean some exponential averaging (which is dsp according to the book I’m reading 🙂 I use cubemx to setup the initial board and peripherals then write my code in Eclipse. I’ve bought a number of nucleo boards from digikey and haven’t had any issues yet. I got started by buying the ebook “mastering Stm32” from lean publishing. There may be other resources now, but the book leads you through setup of the tool chain, and how to use all the peripherals in different ways using the HAL framework. It helped me immensely since it’s not all packaged up nicely like arduino.

    3. @Undefined Lastname oh man!! this is like the third time in a week that ive seen exponential averaging come up. i implemented it the other day. what a beautiful algorithm. also you have made me feel a lot better because i have a tab open for ‘mastering stm32’. i just got cubemx up & it pooped out some code into atollic truestudio which i can see is an eclipse fork. ive been on a safari trying to get a hold on this stuff and you’ve made me feel a whole lot better. cheers ears. can i email you with a variety of annoying noob questions? 🙂

    4. pepe6666 it’s a bit to work out at first, but the hardest part is setting up your tool chain. Once you figure that out, and where to copy the files cube spits out into an Eclipse project it’s smoother (no idea about truestudio.) That’s not to say using the peripherals is as easy as arduino, as arduino really babies you, but it’s doable. It’s one of those “steep at first” learning curves. You’ll do a lot of internet searching, especially for the RTC and backup registers. Took me forever to get that stuff working correctly with low power modes.

      Also, stmicro likes to spread out their information across multiple datasheets and app notes, whereas Atmel throws it all into one datasheets. These are just as complicated as an arduino zero if you dig under the hood, both 32 bit arm processors. It’s like a jump from a bike to a motorcycle. Same ideas, just more complicated.

      Always try breaking up your code into testable chunks for peripherals. Instead of implementing an entire real time clock, start with getting the RTC to just run, then print out the unset time, then figure out setting the time, then get it to remember the time during low power, etc. Don’t implement 20 different things unless you know they all work, as some internal clocks and settings can influence each other. Otherwise you don’t know where to start when things go wrong.

      Dont be afraid to start a fresh new project with just the bare minimum things enabled to do debugging. If you are having an issue with SPI or something, it can help to start with a clean slate project and just get that working. Again, things can interact or your main project could get complicated and you missed that you did something stupid (like some global variable you set in two places or other mistake.)

      Lastly, the nucleo boards come with stlink, learn to use it for debugging. It’s covered in mastering Stm32. It’s amazingly better than print statements for watching variables and values while slowly stepping through code. My ESP32 project I’m doing now I never setup debugging (it looks complicated with dual cores and a real time OS running) and I miss the debugger…. Forced to use print statements. Real world of difference.

      I don’t know if there are other, better resources for Stm32 now, as I bought the book 2 years ago, but it’s a great place to start for $20. Lots of arduino information on the internet, less so about Stm32 and especially with the newer Hal framework.

    5. @Tuetuopay though that’s a bit unfair because most avr instructions are 1-cycle. Anyway, nice seing videos about stm32, it’s a great chip family.

  2. Please make a short video on CAN interface using STM32. There is no concise content on CAN bus. Most CAN devices are expensive and use proprietary controllers. STM32 might help get the cost down.

  3. Perfect timing I’m looking at STM uC for two projects. Danke schon! Aber the ‘blue pill’ some-one might get the wrong idea if I said I was getting some blue pills!

  4. Hello
    try to design the logic in flowchart and get auto coding done using flowchart to code converter in least time. As we know code is the implementation of design, but many times people do basic design and do keep trying changing the code then on. This is time consuming and less efficient method. Try flowchart to code converter once. Please watch videos available.

  5. If you want to get a little bit complicated. One can also use ST link programmer along with STM CubeMX and Keil IDE. In that way you can get full outcomes from that ARM STM.

  6. My brain started smoking when you shorted two pins by solder and then at the end burned another wire cover while soldering a pin :))

  7. Hello, thank you for video, can you say please, how to use WatchDog timer in this case? Because, i couldn’t use avr/wdt.

  8. I don’t agree. STM32 on the paper are wonderful. In the Arduino world, far from perfect. 1) The same sketch uses much more resources. 2) The 32 bits needs much more process power so the outcome is a treatment that is not this fast. 3) These products are not mature / maybe too densely integrated. Result: they lack precision. I used the timers and got differences up to 300 clock counts. This is even specified in the datasheet that there are some clock over counts (in fact a lot). Not as good as Atmega328! 4) The Arduino support is crap. STM32duino.com just went down and this was the main source of information for developers. So well, I keep using it for 3.3V circuits for general stuffs, many communications protocols, without great precision, and because of its real main advantage: very low cost.

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *