<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <link href="https://funduinoshop.com/en/blog/?sAtom=1" rel="self" type="application/atom+xml" />
    <author>
        <name>Funduinoshop</name>
    </author>
    <title>Blog / Atom Feed</title>
    <id>https://funduinoshop.com/en/blog/?sRss=1</id>
    <updated>2026-05-07T01:31:23+02:00</updated>
    
        <entry>
            <title type="text">WRO German final 2025</title>
            <id>https://funduinoshop.com/en/blog/wro-german-final-2025</id>
            <link href="https://funduinoshop.com/en/blog/wro-german-final-2025"/>
            <summary type="html">
                <![CDATA[
                
                                            This year, we were once again able to exhibit at the German finals of the World Robot Olympiad - this time from June 27-28, 2025 in the Westfalenhalle Dortmund.
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 
 
   This year, we were once again able to exhibit at the German finals of the World Robot   Olympiad   - this time   from 27-28.06.2025   in   the Westfalenhalle   Dortmund. We were already at the start in Passau in 2024, and it was a great experience for us   great   Feeling to now be part of this special (and   (and constantly growing!)   Event for the second time.   
 
 
       
   We gathered an incredible number of impressions and   great   Conversations, especially with children and young people from a wide range of age groups. The enthusiasm and curiosity with which they approach technology and robotics is simply infectious and a real joy. For us, the final was not only exciting, but also absolutely enriching.   
 
 
   We would like to take this opportunity to praise Markus   Fleige   and his team, who once again did a great job organizing the event. You could feel at every turn how much heart and soul went into the event.   
 
 
   At the   Funduino  -Stand, we presented some of our products - including the Starter Kit   and the Cube   the   Unitree   Go2 robot dog. The young audience was particularly enthusiastic, asked countless questions and marveled at the dog with shining eyes.   
 
 
   All in all, it was an all-round successful weekend full of inspiration, exchange and great encounters. We are grateful to have been there - and are already looking forward to the next time!   
    Your team from Funduino       
 &amp;nbsp; 
 
 
                ]]>
            </content>

                            <updated>2025-08-22T11:45:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">European Robotics Forum 2025</title>
            <id>https://funduinoshop.com/en/blog/european-robotics-forum-2025</id>
            <link href="https://funduinoshop.com/en/blog/european-robotics-forum-2025"/>
            <summary type="html">
                <![CDATA[
                
                                            From March 25 to 27, 2025, we were represented at the European Robotics Forum in Stuttgart - one of the most important meeting places for robotics experts from all over Europe.
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 
 
   From     25. to March 27, 2025     we were at the     European Robotics Forum in Stuttgart     one of the most important meeting places for robotics experts from all over Europe.   
 
 
   This time   we were there exclusively with the     Robot arms from   Dobot     i  at the Culture and Congress Center in   Stuttgart   and were able to present them to an international audience of experts. It was an exciting opportunity for us to demonstrate the versatile application possibilities of the   Dobot  -Systems live and to talk to interested visitors.   
 
 
       
   The response was great: many experts from research, industry and education took the opportunity to see the robots in action. We were particularly pleased with the amazement and enthusiasm that we could sense at our stand - whether it was during the initial meeting or in the intensive technical discussions that ensued.   
 
 
   We are going home from Stuttgart with many new impressions. It was particularly valuable for us to be part of this international network and to present the   Dobots   to such a broad specialist audience. The discussions and feedback encourage us to continue actively promoting robotics in education and practice. For us, the first appearance at the     European Robotics Forum     was an important step for us - and certainly not the last.   
    Your team from Funduino   
       
 
 
                ]]>
            </content>

                            <updated>2025-08-22T11:30:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Didacta 2025 in Stuttgart</title>
            <id>https://funduinoshop.com/en/blog/didacta-2025-in-stuttgart</id>
            <link href="https://funduinoshop.com/en/blog/didacta-2025-in-stuttgart"/>
            <summary type="html">
                <![CDATA[
                
                                            From February 11 to 15, 2025, we were once again represented at Didacta in Stuttgart - and as in previous years, the trade fair once again lived up to its promise.
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 
 
   From     11. to February 15, 2025     we were again at the     Didacta in Stuttgart     and, as in previous years, the trade fair has once again   once again   once again   delivered what it promised  .   
 
 
   We were able to have many exciting conversations   with you and were delighted with the great interest in our products. We presented a colorful mix at our stand: from   our   classic     Funduino  -Products     to the     Dobot  -Robot arms     up to    Flux laser cutters    . It was particularly nice to see that visitors from all age groups were enthusiastic about our technology - from curious pupils to experienced teachers. It is precisely this exchange with so many different people that makes Didacta so special for us.   
     
 
 
   A real highlight this year   w  was   the     Unitree   Go2    . The agile robot dog immediately attracted everyone&#039;s attention, made eyes light up and became a crowd puller. Numerous photos were taken and many took the opportunity to interact with it themselves. The enthusiasm   was downright   was palpable - and we really enjoyed it too.   
 
 
     
   We can look back on five intensive days at the trade fair, full of inspiration, exchanges and new ideas. In addition to many impressions, we also take   YOUR   valuable feedback and new impulses that encourage us in our work. A big thank you to everyone who visited us - you made Didacta 2025 a great experience for us   very   a very special experience for us. We are already looking forward to seeing you again next year!   
 &amp;nbsp; 
 
 
    Your team   from   Funduino    
 
 
                ]]>
            </content>

                            <updated>2025-08-22T11:15:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">LED Halloween Pumpkin</title>
            <id>https://funduinoshop.com/en/blog/led-halloween-pumpkin</id>
            <link href="https://funduinoshop.com/en/blog/led-halloween-pumpkin"/>
            <summary type="html">
                <![CDATA[
                
                                            Halloween is near and the spooky fever is rising. That&#039;s why this year there&#039;s a fun pumpkin for all technology hobbyists.
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  LED Halloween Pumpkin  
 Halloween is near and the spooky fever is rising. That&#039;s why this year there&#039;s a fun pumpkin for all technology hobbyists. 
 Traditionally, a face is carved into a hollowed-out pumpkin and then a candle is placed inside. But unfortunately the pumpkin only lasts a few days and the candle burns out. However, this is not the case with a 3D printed pumpkin and LED ring. This can shine through the whole night and longer.&amp;nbsp; 
 &amp;nbsp; 
 Building instructions 
  Materials:  
 
  3D&amp;nbsp;printer  
  3D&amp;nbsp;model of pumpkin  
  LED ring WS2812B with 8 pixels  
  Arduino compatible Nano  
  Jumper cable  
 
 &amp;nbsp; 
 Step 1: Print 3D model 
 Download the&amp;nbsp; 3D model of the pumpkin &amp;nbsp;herunter&amp;nbsp;and print it with your 3D printer.&amp;nbsp; 
 &amp;nbsp; 
 Step 2: Assemble Electronics 
 Connect the LED ring cables to the Arduino compatible Nano. Then connect the Nano to your computer with a USB cable.&amp;nbsp; 
    
 &amp;nbsp; 
 Step 3: Transfer code 
 Open the Arduino IDE and paste the following code: 
 # include &amp;nbsp;&amp;lt;Adafruit_NeoPixel.h&amp;gt;&amp;nbsp;//&amp;nbsp;The Adafruit NeoPixel library is used to control the LED ring 
 # ifdef &amp;nbsp;__AVR__ 
 # include &amp;nbsp;&amp;lt;avr/power.h&amp;gt; 
 # endif  
 # define &amp;nbsp;PIN&amp;nbsp;5&amp;nbsp;//&amp;nbsp;Data line on pin 5 
 Adafruit_NeoPixel&amp;nbsp;strip&amp;nbsp;=&amp;nbsp;Adafruit_NeoPixel(8,&amp;nbsp;PIN,&amp;nbsp;NEO_GRB&amp;nbsp;+&amp;nbsp;NEO_KHZ800);&amp;nbsp;//&amp;nbsp;In this example there are 8 pixels on the LED ring. 
 void&amp;nbsp;setup()&amp;nbsp;{ 
 &amp;nbsp;&amp;nbsp;strip.begin(); 
 &amp;nbsp;&amp;nbsp;strip.show();&amp;nbsp;//&amp;nbsp;Turn off all pixels initially 
 } 
 void&amp;nbsp;loop()&amp;nbsp;{ 
 &amp;nbsp;&amp;nbsp;for&amp;nbsp;(int&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;strip.numPixels();&amp;nbsp;i++)&amp;nbsp;{ 
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;strip.setPixelColor(i,&amp;nbsp;strip.Color(255,&amp;nbsp;random(100,183),&amp;nbsp;random(20)));&amp;nbsp;//&amp;nbsp;The pixels each glow red-orange in random colors. 
 &amp;nbsp;&amp;nbsp;} 
 &amp;nbsp;&amp;nbsp;strip.show(); 
 &amp;nbsp;&amp;nbsp;delay(random(100)); 
 } 
 Then click the &quot;Upload&quot; button to transfer the code to the Arduino compatible Nano. 
 &amp;nbsp; 
 Step 4: Put LED ring into the pumpkin 
 Step 4: Insert LED ring into the pumpkin Place the LED ring in the pumpkin and insert the cables through the opening in the pumpkin. 
 Complete! 
 Now you can admire your Halloween pumpkin with the LED ring. 
   
 &amp;nbsp; 
  Components of Funduino  
 
 1x&amp;nbsp; Funduino Nano R3 CH340 chip soldered ready &amp;nbsp; 
 1x&amp;nbsp; LED ring WS2812B with 8 pixels  
  40 pieces breadboard cable female/female (20cm)  
 
 &amp;nbsp; 
                ]]>
            </content>

                            <updated>2025-08-21T22:15:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Button on the Raspberry Pi</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/button-on-the-raspberry-pi</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/button-on-the-raspberry-pi"/>
            <summary type="html">
                <![CDATA[
                
                                            In the first examples we got to know the GPIO pins as outputs, which we switched to HIGH to let an LED light up. But GPIO stands for General Purpose Input/Output. So you can also use the pins as input....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  In the first examples we got to know the GPIO pins as outputs, which we switched to HIGH to let an LED light up. But GPIO stands for General Purpose Input/Output. So you can also program the pins as input. Then it can be determined whether there is a voltage at the input (HIGH) or not (LOW). The Raspberry Pi has only digital inputs (a workaround for measuring analog voltages we will get to know later), nevertheless the applied voltage does not have to be exactly 3.3V to be recognized as HIGH, and not 0V to be recognized as LOW. Up to about 1.4V is recognized as LOW, everything above 1.9V is surely recognized as HIGH. The only problem is the small range around ½ of 3.3V and a free pin with nothing connected to it.  
  We will get to know several digital sensors which should trigger an alarm or a certain action in our program (e.g. motion detector). The simplest of these sensors is the button, a spring-loaded switch that closes a circuit when the button is pressed and opens it again when the button is released.  
  If we connect one contact of the button to a GPIO pin and the other to 3.3V, the signal HIGH is clearly detected when the button is pressed. The problem starts after the button is released. What is the state of the GPIO then? An undefined one! You can&#039;t program with it. In the switched off state the GPIO should be permanently at GND potential. But this would lead to a short circuit when the button is pressed. Remedy is a resistor, which must be so large that only a small current flows. Resistors of 4.7 k&amp;nbsp;(=4700 ohms) or 10 kΩ&amp;nbsp;(=10,000 ohms) are common. These resistors are called pull-down resistors.  
  But you can also program the GPIO so that it normally indicates HIGH and recognizes the key press against GND as a change to LOW. Then the resistor is called pull-up resistor. And to make it even more confusing for beginners, the Raspberry Pi GPIOs have an internal pull-up or pull-down resistor that can be enabled or disabled in the program. Fortunately, this makes the initial circuits very simple.  
  The circuit diagram: Push button on the Raspberry Pi  
     
     
  The program code: Push button on the Raspberry Pi  
  from gpiozero import LED, Button
from signal import pause
led = LED (12 )
 button  = Button (16 )
 button  .when_pressed  = led .on 
 button  .when_released  = led. off 
  pause  ()    
   From the module gpiozero, the classes LED and button are imported, separated by commas, then the objects led and button are instantiated with their respective GPIO numbers.     Instead of the    sleep()   -Function from the module    time   &amp;nbsp;module,    pause   &amp;nbsp;from the module    signal   &amp;nbsp;sleep() would mean complete standstill, the keystroke would not be noticed in the time. Without pause() the program would terminate and nothing would happen.     The instantiation of button was very simple, because we only specified the GPIO number and otherwise used the default settings (see class definition next line). If you want to deviate from this, you have to enter additional parameters as keyword arguments.   
   class  gpiozero .Button  (pin , *,  pull_up=True ,  active_state=None ,  bounce_time=None ,
 hold_time=1 ,  hold_repeat=False ,  pin_factory=None )  
   More details about gpiozero can be found      here     .    
  Extension of the experimental setup: A traffic light cycle is to be started with a Raspberry Pi when a button is pressed.  
  The experimental setup is based on the first example. Instead of a LED, the LED traffic light is used. This has built-in series resistors. We instantiate three LED objects and define a function trafficLight, which is called when a button is pressed.  
  The program code: Traffic light cycle on Raspberry Pi   
  from gpiozero  import  LED, Button
from signal  import  pause
from time  import  sleep
redled = LED (16 )
yellowled = LED (20 )
greenled = LED (21 )
button = Button (12 )
def trafficLight():
       redled.on()
    sleep(1)
    yellowled.on()
    sleep(1)
    greenled.on()
    redled.off()
    yellowled.off()
    sleep(1)
    yellowled.on()
    greenled.off()
    sleep(1)
    redled.on()
    yellowled.off()
    sleep(1)
    redled.off()
button.when_pressed = trafficLight
pause()  
  Extension: Reaction game with two buttons on Raspberry Pi  
   You need two buttons, a buzzer and a red and a yellow LED. After starting the Reaction Game, the yellow LED lights up first. With    time = uniform(5, 10)   &amp;nbsp;the red LED lights up after a random time between five and ten seconds. Then two players can each press their button as fast as possible. Whoever presses too early will be caught cheating, the buzzer will sound for half a second.   
  The program code: Reaction buzzer with two buttons on the Raspberry Pi   
   #! /usr/bin/python3 
 # Reaction Game - push button, when red LED lights-up 
 # based on gpiozero documentation, Basic Recipes 
 # enhanced to recognize cheating by Bernd Albrecht 
 # Red LED lights-up 5 - 10 sec after the yellow LED 
 from  gpiozero  import  Button, LED, Buzzer
 from  time  import  sleep
 from  random  import  uniform
 from  sys  import  exit
led_red = LED (16 )
led_yellow = LED (20 )
buzzer = Buzzer (12 )
player_1 = Button (23 )
player_2 = Button (18 )

led_yellow .on ()
time = uniform (5 ,  10 )
sleep(time)
 if  player_1.is_pressed:
    print ( &quot;Player 1 is cheating!&quot; )
    buzzer .on ()
    sleep (0.5 )
    buzzer .off ()
    led_yellow .off ()
    exit()
 if  player_2.is_pressed:
    print ( &quot;Player 2 is cheating!&quot; )
    buzzer .on ()
    sleep (0.5 )
    buzzer .off ()
    led_yellow .off ()
    exit()
led_red .on ()
led_yellow .off ()
 while  True:
    if  player_1.is_pressed:
        print ( &quot;Player 1 wins!&quot; )
        break 
    if  player_2.is_pressed:
        print ( &quot;Player 2 wins!&quot; )
        break 
led_red .off ()  
                ]]>
            </content>

                            <updated>2022-07-27T14:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">RGB LED on the Raspberry Pi</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/rgb-led-on-the-raspberry-pi</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/rgb-led-on-the-raspberry-pi"/>
            <summary type="html">
                <![CDATA[
                
                                             An RGB LED is the combination of three LEDs of different colors in one housing. The term RGB refers to the colors &quot;red&quot;, &quot;green&quot; and &quot;blue&quot;. The respective LEDs can be controlled with pulse width modulation (PWM)....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Controlling a RGB LED with a Raspberry Pi microcontroller 
 What is an RGB LED anyway? 
 An RGB LED is the combination of three LEDs of different colors in one package. Behind the name RGB are the colors &quot;red&quot;, &quot;green&quot; and &quot;blue&quot;. The respective LEDs can be controlled with pulse width modulation (PWM). Thus a multitude of color combinations is possible. 
 An RGB LED has four legs, one for each color and one common for all three colors. The longest of the four legs is the common anode (+) or cathode (-), depending on the version. The single leg next to this longest one is the connection for the red component. The green and blue parts are controlled by the legs on the other side.    
 Which type of RGB-LED you have, common anode or common cathode, is not visible from the outside. Fortunately you can&#039;t damage anything by trial and error. In blocking direction the RGB-LED does not shine. Important: Also the three implemented LEDs need series resistors. If you want to do it academically, you can calculate different series resistors from the respective flux voltages. For simplicity, you can also use equal resistors between 100 and 330 Ω (Ohm). 
 Version a: &quot;Common cathode&quot; - The longest leg of the LED is &quot;-&quot; and the three shorter legs are driven at the GPIOs with &amp;nbsp;&quot;+&quot; (voltage). 
 Version b) &quot;Common anode&quot; - The longest leg of the LED is &quot;+&quot; and the three shorter legs are controlled with &quot;-&quot; (GND) at the GPIOs. 
 By mixing the colors, many more colors can be created. For example, driving the colors &quot;blue&quot; and &quot;green&quot; produces the color &quot;turquoise&quot;, red and green produces yellow, red and blue produces magenta, and all three colors with equal amounts produce white. 
       The circuit diagram: RGB LED on the Raspberry Pi   
 The program code: RGB LED on the Raspberry Pi 
 Example program for a RGB LED with common cathode: 
 from gpiozero  import  RGBLED
from time  import  sleep
 led  = RGBLED (red=14,   green=15,   blue=18) 
 duration  =  2 

 # slowly increase intensity of all colors (5sec) 
for n  in  range (100 ):
    led .blue  =  n/100 
    led .red  =  n/100 
    led .green  =  n/100    
    sleep (0.05 )
led .color  = (0 ,  0 ,  0 )  # off 
sleep(duration)
led .red  =  1   # full red 
sleep(duration)
led .red  =  0.5   # half red 
sleep(duration)
led .color  = (1 ,  1 ,  0 )  # yellow 
sleep(duration)
led .color  = (0 ,  1 ,  0 )  # full green 
sleep(duration)
led .color  = (0 ,  1 ,  1 )  # cyan 
sleep(duration)
led .color  = (0 ,  0 ,  1 )  # full blue 
sleep(duration)
led .color  = (1 ,  0 ,  1 )  # magenta 
sleep(duration)
led .color  = (1 ,  1 ,  1 )  # white 
sleep(duration)
led .color  = (0 ,  0 ,  0 )  # off 
sleep(duration) 
 Later we will see how to use three potentiometers to set the color components. But for this we need an external analog to digital converter, because the Raspberry Pi only knows digital signals - HIGH or LOW. 
    
                ]]>
            </content>

                            <updated>2022-07-19T09:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Build RC Car for Arduino: Autonomous vehicle - part 3</title>
            <id>https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-3</id>
            <link href="https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-3"/>
            <summary type="html">
                <![CDATA[
                
                                            Welcome to the third installment of our blog series on robot cars. In the first part, we learned the basics for the basic vehicle. In the second part, we developed a universal code system that we can use to set driving levels of the robot car....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  Understanding the mobility of the future with robot cars, part 3  
 Welcome to the third installment of our blog series on robotic cars. In the   first part  &amp;nbsp;we learned about the basics of the basic vehicle. In the   second part  &amp;nbsp;we developed a universal code system to define driving levels of the robot car and realized a simple remote control with an infrared remote control. Due to the physical limitations of this remote control, in this episode I would like to show the transmission of driving instructions using Bluetooth, e.g. from a smartphone to the BT receiver HC-05. Bluetooth is a 2.4GHz radio signal with short range. Safe up to about 10m and interference free in sunlight. 
 The Bluetooth module HC-05 is actually a  transceiver=transmitter + receiver . However, we use it only as a receiver, for sending the driving instructions we use a Bluetooth APP on the Android smartphone (because of the special way of Apple with Bluetooth it does not work with an iPhone). In principle, it is also possible to build a Bluetooth remote control with the HC-05; however, this requires a second HC-05, more micro controller and an input device (joystick controller). 
 &amp;nbsp;  
  Of the six pins on the HC-05 module, only four are needed: VCC (5V) and GND for the module&#039;s power supply, and RXD and TXD for connection to two pins of the microcontroller where SoftwareSerial is set up. However, you can&#039;t ignore the inscription LEVEL: 3.3V in order not to damage the module. On our microcontroller with 5V logic, we need a voltage divider from 5V to 3.3V at least for the RXD pin, so resistors of 1 kOhm and 2.2 kOhm, for example. 
 The schematic: HC-05 module on the microcontroller    
 The AT commands of the HC-05 module for Arduino microcontroller 
 To the left of the connector marked Key there is a small button, which is important for the configuration. When this button is pressed during power-on, we enter the AT command mode (the LED flashes slowly in a 2s rhythm), where we use so-called AT commands (for Attention, Achtung) to make the settings. For this we use a modified example program, where the usual serial port is connected to the Serial Monitor of the Arduino IDE and the HC-05 via SoftwareSerial. 
  /*
  Software serial multiple serial test
 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.
 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device) // voltage divider!
 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart&#039;s example
 This example code is in the public domain.
 */ 
  #include   &amp;lt;SoftwareSerial.h&amp;gt;  
 SoftwareSerial  BTSerial (10 ,  11 );  // RX, TX // mySerial changed to BTSerial 
 char  c= &#039; &#039; ;  // Declaration of variable for transmission 

 void   setup () {
  // Open serial communications and wait for port to open: 
  Serial  .begin  (9600 );  // Baud rate changed to 9600 
  Serial  .println ( &quot;Serial started!&quot; );

  // set the data rate for the SoftwareSerial port 
  BTSerial .begin  (38400 );  // Baud rate for BT 38400 
  Serial  .println ( &quot;BTSerial started! &quot;);
}

 void   loop () {  // run over and over 
  if  (BTSerial .available ()) {
    c=BTSerial .read ();
    Serial  .write (c);
  }
  if  (Serial  .available ()) {
    c=Serial  .read ();
    BTSerial .write (c);
    Serial  .write (c);  // re-transmission of input in Serial Monitor 
  }
} 
 The main AT commands are used in the following figure. The remote station, the HC-05, sends a response if necessary and acknowledges with OK. 
 We are mainly interested in the name and the HEX address in order to uniquely identify the module later on the smartphone. The AT commands are entered into the serial monitor of the microcontroller. In the following picture you can see the serial monitor of the Arduino IDE. 
 If you want, you can change the default password 1234 with &quot;AT+PSWD=xxxx &quot;, where x stands for a digit from 0 to 9. Afterwards check with &quot;AT+PSWD? &quot; if the input was successful.    After finishing the inputs the module is disconnected from power for a short time. After switching on again without pressing a button, the HC-05 module is in standard mode. The LED flashes quickly (approx. 5 times/s). 
 Modifications of the RC-Car: different Motorshield 
 Now to the Robot Car. After we used the Motor Controller V2 last time, which only needs the two I2C connectors SDA=A4 and SCL=A5 for the control signals, this time I want to introduce the older Motor Controller V1, which blocks a lot of digital pins, but can often be bought for a bargain price.     I also modified this Motorshield a bit to get access for sensors and radio receivers. On the digital pin side, there is only one pin that can be accessed using an angled connector: Pin 2. This is good for those who want to connect the IR receiver here. There are more possibilities for expansion on the other side, where you can access all analog inputs as well as the power supply with the help of female connectors (also called female headers). 
 Since all analog inputs can also be used as digital inputs or outputs, we have the possibility to connect our radio receivers here. This works wonderfully with the 433 MHz transceiver HC-12 (see next episode), but for the BT receiver HC-05 only with restrictions. First, we can&#039;t connect the RXD pin directly, we need the voltage divider, and second, the pins don&#039;t provide enough current to power the module on those pins. 
 On the following picture you can see a small adapter we made ourselves, which supplies the HC-05 with 5V and ground from the corresponding pins, connects TXD directly to RX of the SoftwareSerial interface A1 =D15 and RXD via the voltage divider to A2 = D16.   
 The circuit diagram: HC-05 module with L293D Motorshield on Arduino microcontroller     
 The circuit can of course also be realized on a mini breadboard with jumper cables. 
 Like last time, the code for the driving instructions is increased or decreased by pressing a button; this time only not with IR remote control, but with the touch function in the smartphone APP and the Bluetooth query via SoftwareSerial. 
 Pairing the HC-05 Bluetooth Module with an Android Application (APP) 
 Before the APP can connect to the Robot Car, we need to pair it with the Bluetooth module in the settings. This should be quite easy, because we have previously used the AT commands to get the name and HEX address of the HC-05. 
 Once the pairing has worked and a suitable BT app has been installed, it can be launched and set up. By tapping on the magnifying glass in the left picture, suitable devices are displayed. We tap on the HC-05 and get the message &quot;connected&quot;. The app I used offers several interfaces for operation (middle image). I decided to use the game controller. On the middle picture on the top right there are two arrows forming a small circle. Please tap here if the connection is lost. 
 On the right picture are the buttons of a game controller. Before using them for the first time, you have to assign the numerical values to the buttons, which should be transmitted when you tap them. 
 For the cursor buttons I have given the numerical values 1 to 4 in clockwise direction. I assigned the numerical value 5 to the other buttons. These values are passed in the sketch to the variable  blueToothVal &amp;nbsp;and lead in the &amp;nbsp;if-pointers of  the function  loop()  to determine the code for the drive level.    
 The changes from infrared to Bluetooth and motor controller V2 to V1 cause some modifications in the main part of the sketch. On the other hand, almost nothing changes in the motor() function. Only in the notation, due to the different program libraries (libraries), the functions motor1-&amp;gt;setSpeed() now becomes motor1.setSpeed(). 
 The program code: Build RC Car for Arduino 
 * Sample Code  for  Robot Car with Motor Shield V1 and BT receiver   HC-05 , as of  20220515 
* based on Adafruit Motor shield V2 library, copyright Adafruit Industries LLC
*  this  code is  public  domain, enjoy!
* modified  for  Funduino
* Pins
* BT VCC to Arduino  5V out.
* BT GND to GND
* Arduino  A1=15  (SS RX) - BT TX no need voltage divider
* Arduino  A2=16  (SS TX) - BT RX through a voltage divider (5v to  3.3v )
*/

  #include   &amp;lt;AFMotor.h&amp;gt;  
AF_DCMotor motor1 (2 );
AF_DCMotor motor2 (3 );

  #include   &amp;lt;SoftwareSerial.h&amp;gt;  
 // initialize HC-05 
 SoftwareSerial  BTSerial (15 ,  16 );  // RX, TX cross to TX, RX(voltage divider) 
 char  blueToothVal;
 int  x =  0 ;
 int  y =  0 ;
 int  left =  0 ;
 int  right =  0 ;
 int  code =  5555 ;
 int  speedL =  0 ;
 float  factor =  1.8 ;  // Correction for speedLevel 255/100 * 6V/VBatt 

 void   setup () {
  Serial  .begin  (9600 );  // set up Serial Monitor at 9600 bps 
  Serial  .println ( &quot;Motor test!&quot; );
  BTSerial .begin  (9600 );  // set up transmission speed for HC-12 
  Serial  .println ( &quot;SoftwareSerial initialized! &quot;);
}  // end setup 

 void   loop () {
  if (BTSerial .available ())  //if data is received  ... 
 Serial.print(&quot;available&quot;);     
{
    blueToothVal=BTSerial .read () ;//..if they should be read out 
 Serial.println(blueToothVal); 
  }
    if  (blueToothVal== &#039;1&#039; )  //if the Bluetooth module receives a &quot;1&quot; .
    {
      if  ( code&amp;lt;9000 ) code = code +  1000 ;     
      Serial  .print ( &quot;code = &quot; );
      Serial  .println (code);
    }
    else   if  (blueToothVal== &#039;2&#039; )  //if the Bluetooth module receives a &quot;2&quot; .
    {
      if  (( code-1000*int ( code/1000 )) &amp;lt;900 ) code = code +  100 ;
      Serial  .print ( &quot;code = &quot; );
      Serial  .println (code);
    }
    else   if  (blueToothVal== &#039;3&#039; )  //if the Bluetooth module receives a &quot;3.&quot; 
    {
      if  ( code&amp;gt;2000 ) code = code -  1000 ;     
      Serial  .print ( &quot;code = &quot; );
      Serial  .println (code);
    }
    else   if  (blueToothVal== &#039;4&#039; )  //if the Bluetooth module receives a &quot;4&quot; .
    {
    if  ( code-1000*int ( code/1000 ) &amp;gt;  200 ) code = code -  100 ;
      Serial  .print ( &quot;code = &quot; );
      Serial  .println (code);
    } 
    else   if  (blueToothVal== &#039;5&#039; )  //if the Bluetooth module receives &quot;5&quot; ...
    { 
      code =  5555 ;
      Serial  .print ( &quot;code = &quot; );
      Serial  .println (code);    
    }
    delay  (200 );  //little delay for better serial communication and to avoid bouncing 
    motor();
}  // end loop 

 void  motor(){
  int  speedLevel [9 ] ={-100  ,-80  ,-60  ,-40  ,0  ,40  ,60  ,80  ,100} ;
  y =  int (code /  1000 );
  x =  int ((code -  1000*y ) /  100 );
  speedL = speedLevel[ y-1 ];
  Serial  .print ( &quot;code = &quot; );
  Serial  .print (code);
  Serial  .print ( &quot; y = &quot; );
  Serial  .print (y);
  Serial  .print ( &quot; x = &quot;);
  Serial  .print (x);
  Serial  . print( &quot; speedL = &quot;);
  Serial  .println (speedL);

  //Correction of speed steps for curve travel 
  if  ( x==1 ){
    right =  speedL+20 ;
    left =   speedL-20 ;
  }
  else   if  ( x==2 ){
    right =  speedL+15 ;
    left =   speedL-15 ;
  }
  else   if  ( x==3 ) {
    right =  speedL+10 ;
    left =   speedL-10 ;
  }
  else   if  ( x==4 ) {
    right =  speedL+5 ;
    left =   speedL-5 ;
  }
  else   if  ( x==6 ) {
    right = speedL  -5 ;
    left =  speedL+5 ;
  }
  else   if  ( x==7 ) {
    right =   speedL-10 ;
    left =  speedL+10 ;
  }
  else   if  ( x==8 ) {
    right =   speedL-15 ;
    left =  speedL+15 ;
  }
  else   if  ( x==9 ) {
    right =   speedL-20 ;
    left =  speedL+20 ;
  }
  else  {
    right = speedL;
    left = speedL;
  }

  //Input the speed levels for &quot;left&quot; and &quot;right 
  Serial  .print ( &quot;left = &quot; );
  Serial  .print (left);
  Serial  .print ( &quot; right = &quot; );
  Serial  .println (right);

  if  (left &amp;lt;  40  &amp;amp; left &amp;gt;  -40 ) {
    motor1 .run (RELEASE);
  }
  if  (right &amp;lt;  40  &amp;amp; right &amp;gt;  -40 ) {
    motor2 .run (RELEASE);
  }
  if  ( left&amp;gt;=40 ) {
    if  ( left&amp;gt;100 )  left=100 ;
      motor1 .run (FORWARD);
      motor1 .setSpeed (left * factor);
  }
  if  ( right&amp;gt;=40 ) {
    if  ( right&amp;gt;100 )  right=100 ;
      motor2 .run (FORWARD);
      motor2 .setSpeed (right * factor);
  }
  if  (left&amp;lt;=  -40 ) {
    if  ( left&amp;lt;-100 )   left=-100 ;
      motor1 .run (BACKWARD);
      left = -left;
      motor1 .setSpeed (left * factor);
  }
  if  (right&amp;lt;=  -40 ) {
    if  ( right&amp;lt;-100 )   right=-100 ;
      motor2 .run (BACKWARD);
      right = -right;
      motor2 .setSpeed (right * factor);
  }
}  // end motor  
 So much for the second cheapest solution for a Robot Car with remote control (assuming you have an Android smartphone). Next time I will show how easy it is to integrate a 433 MHz transceiver HC-12. With this, even several hundred meters of range can be achieved. However, the costs increase, because now two transceivers and another micro controller are needed. See you then. 
                ]]>
            </content>

                            <updated>2022-06-20T08:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Pulsating LED on the Raspberry Pi (pulse width modulation)</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/pulsating-led-on-the-raspberry-pi-pulse-width-modulation</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/pulsating-led-on-the-raspberry-pi-pulse-width-modulation"/>
            <summary type="html">
                <![CDATA[
                
                                            An LED is said to become pulsatingly brighter and darker. (Also called &quot;fade&quot;, after the verb to fade). We would like to implement this with the so-called pulse width modulation...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 An LED is said to become pulsatingly brighter and darker. (Also called &quot; fade &quot;, after the English verb  to fade  =  to fade  away,  to  decrease). We would like to implement this with the so-called pulse width modulation. More information about pulse width modulation on the Raspberry Pi can be found a bit further down.  In the first step, let&#039;s take a look at the schematic. 
 The schematic: Pulsating LED on the Raspberry Pi (PWM) 
   
  To vary the brightness of a LED, it is not enough to vary the voltage. Due to the design (diode!) a certain minimum voltage is needed; this so-called forward voltage is between approx. 1.6 and approx. 3 V, depending on the color of the LED. Above this forward voltage the LED becomes conductive, the current is limited by a series resistor. So: Unlike incandescent lamps, the brightness is not regulated by the voltage level. By the way, the GPIO pins deliver only exactly 3.3V anyway. 
 The remedy here is pulse width modulation (PWM). Here, the DC voltage is switched on and off with high frequency. The total transmitted energy is determined by the ratio of the duty cycle to the total duration of a cycle. This duty cycle can be between 0 and 100%. 
 On the Raspberry Pi you can use the software PWM on all GPIO pins. But there are also two special hardware PWM pins. Let&#039;s go! 
 The first program code: Pulsating LED on Raspberry Pi with pulse width modulation 
  # We start with importing the program modules 
import RPi.GPIO as GPIO  # Attention: Note the notation: small i 
import  time 
GPIO.setmode(GPIO.BCM)  # We set the mode to BCM 
 LED=23   # The word &quot;LED&quot; now stands for the number &quot; 23 &quot;. 
GPIO.setup(LED,GPIO.OUT) # &quot;  LED&quot; (pin  23 ) is an output .
Dimmer = GPIO.PWM(LED ,100 )  # We set the LED as PWM with a frequency of  100  
Dimmer.start (0 )  # Dimmer is started 
 # Here starts the loop 
 try :
    while   True :  #while loop so that the program runs continuously 
        for  dc  in  range (0  ,101  ,5 ):          # loop of the duty cycle in  steps of 5.  
             Dimmer.ChangeDutyCycle(dc)  # change the duty cycle of the dimmer. 
            time  .sleep  (0.1 )  # Wait  0.1  second .
        for  dc  in  range (100 , -1 , -5 ):      # Loop the duty cycle in steps of -5 . 
            Dimmer.ChangeDutyCycle(dc)  # Change the duty cycle of the dimmer. 
            time  .sleep  (0.1 )  # Wait  0.1  second. 
except KeyboardInterrupt:  # With CTRL+C we interrupt the program 
    print (&quot;Finished&quot;)  # Write &quot;Finished&quot; in the shell window 
    Dimmer .stop ()  # Stop the dimmer. 
    GPIO.cleanup()  # End the program.  
 In this example we will learn another form of loop: the for loop. This command line also ends with a colon followed by indentation of the lines to be repeated. 
 The variable dc (for duty cycle) is incremented in the range 0 to exclusively 101 in increments of five:  for dc in range(0,101,5) : 
 The second for loop counts down from 100 to -1 by -5:  for dc in range(100,-1,-5) : 
 The second program code: Pulsing LED on Raspberry Pi with pulse width modulation using gpiozero command    
 # We start with importing the program modules
from gpiozero import PWMLED
import time
pwmled = PWMLED (23 ) # optional  parameter  frequency=xxx  (default 100) 

# here  starts the loop 
try:
    while  True: # while loop so that the program  runs   continuously 
        for  dc in range(0,101,5):   #  increment the tasgrad in steps of 5. 
            pwmled.value  = (  dc/100 ) # change the duty cycle (between  0  and  1 ) of the dimmer.
            time .sleep  (0.1 ) # Wait  0.1  second.
        for  dc in range (100  ,-1  ,-5 ): # Count down the duty cycle in   steps of -5. 
            pwmled.value = (dc/100 ) #  Change the duty cycle (between 0 and 1) of the dimmer. 
            time.sleep(0.1) # Wait  0.1 second .

except  KeyboardInterrupt: # With CTRL+C we interrupt the program 
    print  (  &quot;Finished&quot;  ) # Write  &quot; Finished &quot;  in the shell window 
# pwmled.value  = 0 # 1. method to  clear the LED at program end 
    pwmled.close()  # 2nd method to clear the LED at program end  
 Overall, the program code is leaner with gpiozero. 
 Please note: The duty cycle is between 0 and 100%. While the duty cycle argument for RPi.GPIO is the % value, gpiozero expects the value as floating  point &amp;nbsp;number between 0.0 and 1. 0, so instead of 50 [%] 0.5. 
                ]]>
            </content>

                            <updated>2022-06-17T10:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Connect buzzer and LED to the Raspberry Pi</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/connect-buzzer-and-led-to-the-raspberry-pi</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/connect-buzzer-and-led-to-the-raspberry-pi"/>
            <summary type="html">
                <![CDATA[
                
                                            In this blog post we want to make a buzzer and an LED light up and sound respectively with the help of a Raspberry Pi microcontroller. This program is often used in schools to demonstrate the...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Note: An active buzzer is required for this program (explanation follows later), attention must be paid to polarity. No series resistor is needed at the buzzer (speaker). 
 In this blog post we want to make a buzzer and an LED light up and sound respectively using a Raspberry Pi microcontroller. This program is popular in schools for showing how simple output signals can be utilized using a Raspberry Pi with simple components.  Before we get into what the difference is between an active and passive speaker, let&#039;s first look at the schematic and program code. 
 The schematic: Connecting buzzer and LED to the Raspberry Pi 
   
 The source code: Connecting Buzzer and LED to the Raspberry Pi 
  # This time we also use the first program section. Here variables are entered. This means that there is a number behind a letter or a word. In our case, the LED is connected to pin 23 and the piezo speaker to pin 4. To avoid confusing the two pins later, we simply rename pin 23 and pin 24. 
 # We start with importing the program modules 
 import  RPI.GPIO  as  GPIO
 import  time
GPIO.setmode(GPIO.BCM)  # We set the mode to BCM 
 LED=23 ;  # The word &quot;LED&quot; now stands for the number &quot;23&quot;. 
 Beeps=24 ;  # The word &quot;beep&quot; now stands for the number &quot;24&quot;. 
GPIO.setup(LED,GPIO.OUT)  # Pin &quot;LED&quot; (pin 23) is an output .
GPIO.setup(Pieps,GPIO.OUT)  # Pin &quot;Pieps&quot; (Pin 24) is an output 
 # Here starts the loop 
 try :
 while   True :  # While loop so that the program runs continuously 
GPIO.output(LED,GPIO.HIGH)  # Turns on the LED .
GPIO.output(Pieps,GPIO.HIGH)  # Turns on the piezo speaker. 
time.sleep (1 )  # Wait 1 second 
GPIO.output(LED,GPIO.LOW)  # Turns off the LED .
GPIO.output(Pieps,GPIO.LOW)  # Turns off the piezo speaker .
time.sleep (1 )
 # Here at the end the program jumps to the start of the while loop. So it&#039;s about to beep and light up again. If you increase or decrease the pause (time.sleep), it will beep and light faster or slower. 
 except  KeyboardInterrupt:  # With CTRL+C we interrupt the program 
 print  (&quot;Finished&quot;)  # Write &quot;Finished&quot; in the shell window 
GPIO.cleanup()  # Exit the program  
 Difference active and passive buzzer 
 The active buzzer has a built-in oscillator, which produces a  buzzing  sound when the voltage of 3.3V or 5V is applied. Due to the design, you have to pay attention to the polarity of the buzzer. At delivery, these buzzers usually have a small sticker with the plus sign and &quot;REMOVE SEAL AFTER WASHING&quot; sticker. There is also a plus + again on the body of the part itself. You have to look twice to see the longer leg. Or you take a small breakout board; here the contacts are marked with S (stands for signal) and - (minus, ground).&amp;nbsp; 
 You can test the buzzer with a simple program like for the blinking LED, where the (almost) arbitrary pin is switched to HIGH for one second and to LOW for one second. 
 The passive buzzer has no built-in oscillator, so the Raspberry Pi has to take over this function. If you try the above program on a passive buzzer, you will hear a soft &quot;click&quot; sound every second. However, if you shorten the pause time extremely (sleep(0.001) or sleep(0.002)) and repeat the on/off for a certain duration, you can hear a sound whose frequency we can easily calculate: one millisecond each of HIGH or LOW means (neglecting the execution time of the other commands) about 500 cycles on/off per second, i.e. about 500Hz. 
 If you want to emit a short warning tone, you should use an active buzzer, which is switched on and off like an LED. Attention should be paid to the polarity. 
 If you want to program a two-tone siren (which can be heard more clearly) or a short recognition melody (jingle), you should use a passive buzzer or a small loudspeaker. 
    
 &amp;nbsp; 
 &amp;nbsp; 
                ]]>
            </content>

                            <updated>2022-06-15T15:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Build RC Car for Arduino: Autonomous vehicle - part 2</title>
            <id>https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-2</id>
            <link href="https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-2"/>
            <summary type="html">
                <![CDATA[
                
                                            Welcome to the second installment of our new blog series on robot cars. In the first part, we learned about the basics for the basic vehicle. This time we want to address possibilities of remote control, developing a code system in the process...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  Understanding the mobility of the future with robot cars, part 2  
 Welcome to the second installment of our new blog series on robotic cars. In the  first part , we learned about the basics for the basic vehicle. This time, we will discuss remote control options, develop a code system to determine the speed levels of the robot car, and finally implement a simple remote control with an infrared remote control. 
 Why do I need speed steps for an RC car for Arduino microcontrollers? 
 1. To control the motor speeds from another device, there is basically the possibility to use a potentiometer (poti) to continuously determine and transmit values, or to increase or decrease the value of the speed step by pressing a button. On the following pictures some selected examples, on the first picture joystick controls: 
 &amp;nbsp;  
 &amp;nbsp; 
 In the second picture we see infrared remote controls, a smartphone app with Bluetooth receiver, and the LCD1602 keypad shield that can be operated with a 433 MHz transceiver, among others: 
 &amp;nbsp;  
 &amp;nbsp; 
 To achieve a uniform scheme, it makes sense to use the map() function to reduce the analog values of the pot to values that can be transmitted via radio. The analog to digital converter provides 10 bit numbers, i.e. values between 0 and 1023. The center position of the mini joysticks is about 511. If you divide the value by 100, you can get two values (x and y direction) with one joystick, which are between 0 and 10 or if you use the map() function between 1 and 9. This is sufficient for entering the speed and for driving curves. No matter if we determine 11 or 9 values, standstill means value 5 in y-direction and for driving straight also value 5. 
 Looking at the controller with the two joysticks (part of the  4DOF Mini robot arm kit with joysticks and servo drive ), I decide to use a code between 1111 and 9999, which is easy to transfer, considering the variety of different systems. The first digit can be used for the y-direction of the left joystick, the second digit for the x-direction of the left joystick, the third and fourth digit for an optional second joystick or certain keys. In the first example with the IR remote control, we only need the first two digits of the four-digit code. 
 The speed control of the RC Car for Arduino 
 The speed control of the motors is done with pulse width modulation (PWM). The value for the so-called duty cycle is an 8-bit number, i.e. a value between 0 and 255 (=2 to the power of 8 -1). If you apply voltages between 0 and 6V to the motor with an adjustable power supply, you will notice that up to approx. 1.5 V nothing is noticeable. Then the motor starts to hum, but does not move. If you measure the current at the same time, you will notice a relatively high value. The energy is converted into heat and humming - not really good. From 2.4 - 3 volts the motor starts to rotate, the amperage drops a bit when the motor is unloaded. After that, the speed increases depending on the applied voltage. When regulating the voltage down, the motor will turn down to below 2 volts, but if it comes to a stop, for example due to increased frictional resistance or an obstacle, it will not restart. Conclusion: values below approx. 2.4 volts should be avoided, the input should be set equal to 0 (zero) to prevent unnecessary wear and power consumption. Except standstill (code=5) we need Duty Cycle between approx. 40% and 100% with a supply voltage of 6V for the motors. 
 The power supply for the RC Car for Arduino 
 We have already discussed several possibilities of power supply in the first part. Four AA batteries of 1.5V each result in 6V, the maximum voltage of the small yellow motors. Four AA batteries of 1.2V each are not sufficient as power supply. You then need a battery holder for 6 batteries and that gives 7.2 volts. And two lithium-ion batteries (nominal voltage 3.7V) deliver more than 8 volts when fully charged. So it makes sense to set a factor in the program that limits the voltage of the highest drive level at 6V. 
 The control of the RC Car for Arduino 
 If the driving instructions are given with buttons, which may even be in a smartphone app, the appropriate value is increased or decreased to the output value 55xx (standstill) without exceeding the maximum. 
 Reading out the code correctly 
 The assignment of the first digit of the code to the required values of the speed steps is done via the index of a list with the respective numerical values. 
 Conclusion: With a four-digit code we can control speed and cornering with the first two digits, the rear two digits are used for other functions (not needed at first). So, for example, code95xx for fastest straight ahead travel, 55xx for standstill, 77xx for forward travel to the right.&amp;nbsp; 
 
 
 
 
 
 y ↓ 0&amp;nbsp; x→ 
 
 
 1 
 
 
 2 
 
 
 3 
 
 
 4 
 
 
 5 
 
 
 6 
 
 
 7 
 
 
 8 
 
 
 9 
 
 
 
 
 9 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  ↑  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 8 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  ↑  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 7 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  ↑  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 6 
 
 
 ← 
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
 ↑ 
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
 → 
 
 
 
 
 5 
 
 
 ← 
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
  0  
 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 &amp;nbsp; 
 
 
 → 
 
 
 
 
 4 
 
 
 ← 
 
 
 &amp;nbsp; 
 
 
 ↙ 
 
 
 &amp;nbsp; 
 
 
 ↓ 
 
 
 &amp;nbsp; 
 
 
 ↘ 
 
 
 &amp;nbsp; 
 
 
 → 
 
 
 
 
 3 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 
  ↙  
 
 
 &amp;nbsp; 
 
 
  ↓  
 
 
 &amp;nbsp; 
 
 
  ↘  
 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 2 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 
  ↙  
 
 
 &amp;nbsp; 
 
 
  ↓  
 
 
 &amp;nbsp; 
 
 
  ↘  
 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 1 
 
 
  ←  
 
 
 &amp;nbsp; 
 
 
  ↙  
 
 
 &amp;nbsp; 
 
 
  ↓  
 
 
 &amp;nbsp; 
 
 
  ↘  
 
 
 &amp;nbsp; 
 
 
  →  
 
 
 
 
 
 &amp;nbsp; 
 Now we want to build our first Smart Robot Car with the kit, an ATmega328 microcontroller (design of the UNO R3), a MotorShield V2 and IR transmitter and receiver. 
 The Motor Shield V2 can control up to four motors. For the connection of the control lines the so-called I2C bus with the connections SDA (=Serial Data) at the analog input A4 and SCL (=Serial Clock) at A5 are used. Adafruit has also developed and provided a suitable program library for this. Attention: The libraries for Motor Shields V1 and V2 are not compatible. 
 &amp;nbsp;  
 Picture Motor Shield V2 with modification:  Soldered socket connectors (female connectors) for connection of additional equipment 
 No matter which Motor Shield you want to use - V1 or V2 -,&amp;nbsp; it makes sense to solder in additional female connectors for both Motor Shields to connect Bluetooth or 433 MHz transmitters/receivers or sensors later. More about this in the following blog posts. The IR receiver only needs power supply from pin 3 and 4 and pin2 for the IR receiver. The soldering iron can still stay cold. 
 For control we will first use the small infrared remote control from Funduino and an IR receiver. Although the &quot;naked&quot; IR sensor will do, I recommend the small breakout board, as it has an LED that flickers when IR signals are received; a valuable tool when looking for a fault. 
 The sketch is composed of two tried and tested parts: Armin Joachimsmeyer&#039;s example sketch, which he added to his great IRremote program library, and a Robot Car sketch by the author based on Adafruit&#039;s program library. 
 The program code for the RC Car for Arduino 
  /* Sample Code for Robot Car with Motor Shield V2 and IR receiver, as of 20220515
* based on Adafruit Motor shield V2 library, copyright Adafruit Industries LLC, 2009
* and SimpleReceiver.cpp, part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote
* MIT License Copyright (c) 2020-2022 Armin Joachimsmeyer
* modified for Funduino
* Motor Shield V2 utilizes I2C with SDA=A4 and SCL=A5
* IRreceiver utilizes Pin 2
 ************************************************************************************
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the &quot;Software&quot;), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is furnished
 * to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *************************************************************************************/ 
 
  #include   &amp;lt;Adafruit_MotorShield.h&amp;gt;  
 // Create the motor shield object with the default I2C address 0x60 
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
 // Select which &#039;port&#039; M1, M2, M3 or M4.  
Adafruit_DCMotor *motor1 = AFMS.getMotor (2 );
Adafruit_DCMotor *motor2 = AFMS.getMotor (3 );

 // define protocol for remote control, for more see samples code SimpleReceiver.cpp 
  #define  DECODE_NEC  // Includes Apple and Onkyo, also for tiny Funduino remote control  
 //#define INFO // To see valuable informations from universal decoder for pulse width or pulse distance protocols 
  #define  IR_RECEIVE_PIN 2  // instead of #include &quot;PinDefinitionsAndMore.h&quot;  
  #include   &amp;lt;Arduino.h&amp;gt;  
  #include   &amp;lt;IRremote.hpp&amp;gt;  

 // IR Receiver signal connected to Pin2, VCC to Pin3, GND to Pin4 
 int  IR_GND =  4 ;  
 int  IR_VCC =  3 ;

 int  x =  0 ;
 int  y =  0 ;
 int  left =  0 ;
 int  right =  0 ;
 int  code =  5555 ;
 int  speedL =  0 ;
 float  factor =  1.8 ;  // Correction for speedLevel 255/100 * 6V/VBatt 

 void   setup () {
  Serial  .begin  (9600 );
  Serial  .println ( &quot;Motor test!&quot; );
  Serial  .print ln( &quot;Motorshield v2 - DC Motor test!&quot; );
  if  (!AFMS .begin ()) {  // create with the default frequency 1.6KHz 
    Serial  .println ( &quot;Could not find Motor Shield. Check wiring.&quot; );
    while  (1 );
  }
  Serial  .println ( &quot;Motor Shield found.&quot; );
  // Just to know which program is running on my Arduino 
  Serial  .println (F( &quot;START &quot;  __FILE__  &quot; from &quot;  __DATE__  &quot;\r\nUsing library version &quot;  VERSION_IRREMOTE));
  // Start the receiver 
  IrReceiver .begin (IR_RECEIVE_PIN);  //, ENABLE_LED_FEEDBACK); 
  Serial  .print (F( &quot;Ready to receive IR signals of protocols: &quot; ));
  printActiveIRProtocols( &amp;amp;Serial );
  Serial  . print(F( &quot;at pin &quot; ));
  Serial  .println (IR_RECEIVE_PIN);  
  // initialize digital pins as output for power supply 
  pinMode (IR_GND ,OUTPUT );
  pinMode (IR_VCC ,OUTPUT );
  digitalWrite (IR_GND ,LOW );
  digitalWrite (IR_VCC ,HIGH );    
}  // end setup 

 void   loop () {
  if  (IrReceiver.decode()) {
      // Print a short summary of received data 
      IrReceiver.printIRResultShort( &amp;amp;Serial );
      if  (IrReceiver.decodedIRData.protocol == UNKNOWN) {
          // We have an unknown protocol here, print more info 
          IrReceiver.printIRResultRawFormatted( &amp;amp;Serial , true);
      }
      Serial  .println ();
      /*
       * !!!Important!!! Enable receiving of the next value,
       * since receiving has stopped after the end of the current received data packet.
       */ 
      delay  (100 );  // Debounce, no fast retry      
      IrReceiver.resume();  // Enable receiving of the next value 
      /*
       * Finally, check the received data and perform actions according to the received command
       */ 
  if  (IrReceiver.decodedIRData.command ==  0x46 ) {
    if  ( code&amp;lt;9000 ) code = code +  1000 ;     
    Serial  .print ( &quot;code = &quot; );
    Serial  .println (code);
    }
  else   if  (IrReceiver.decodedIRData.command ==  0x15 ) {
    if  ( code&amp;gt;2000 ) code = code -  1000 ;     
    Serial  .print ( &quot;code = &quot; );
    Serial  .println (code);
    } 
  else   if  (IrReceiver.decodedIRData.command ==  0x43 ) {
    if  (( code-1000*int ( code/1000 )) &amp;lt;900 ) code = code +  100 ;    
    Serial  .print ( &quot;code = &quot; );
    Serial  .println (code);
    }
  else   if  (IrReceiver.decodedIRData.command ==  0x44 ) {
    if  ( code-1000*int ( code/1000 ) &amp;gt;  200 ) code = code -  100 ;
    Serial  .print ( &quot;code = &quot; );
    Serial  .println (code);
    }
  else   if  (IrReceiver.decodedIRData.command ==  0x40 ) {
    code =  5555 ;
    Serial  .print ( &quot;Code = &quot; );
    Serial  .println (code);
    }
  else  {
    Serial  .print ( &quot;invalid code&quot; );
    }
  motor();
  }
}  // end loop 

 void  motor(){
  int  speedLevel [9 ] ={-100  ,-80  ,-60  ,-40  ,0  ,40  ,60  ,80  ,100} ;
  y =  int (code /  1000 );
  x =  int ((code -  1000*y ) /  100 );
  speedL = speedLevel[ y-1 ];
  Serial  .print ( &quot;code = &quot; );
  Serial  .print (code);
  Serial  .print ( &quot; y = &quot; );
  Serial  .print (y);
  Serial  .print ( &quot; x = &quot;);
  Serial  .print (x);
  Serial  . print( &quot; speedL = &quot;);
  Serial  .println (speedL);

  //Correction of speed steps for curve travel 
  if  ( x==1 ){
    right =  speedL+16 ;
    left =   speedL-16 ;
  }
  else   if  ( x==2 ){
    right =  speedL+13 ;
    left =   speedL-13 ;
  }
  else   if  ( x==3 ) {
    right =  speedL+10 ;
    left =   speedL-10 ;
  }
  else   if  ( x==4 ) {
    right =  speedL+7 ;
    left =   speedL-7 ;
  }
  else   if  ( x==6 ) {
    right = speedL  -7 ;
    left =  speedL+7 ;
  }
  else   if  ( x==7 ) {
    right =   speedL-10 ;
    left =  speedL+10 ;
  }
  else   if  ( x==8 ) {
    right =   speedL-13 ;
    left =  speedL+13 ;
  }
  else   if  ( x==9 ) {
    right =   speedL-16 ;
    left =  speedL+16 ;
  }
  else  {
    right = speedL;
    left = speedL;
  }

  //Input the speed levels for &quot;left&quot; and &quot;right 
  Serial  .print ( &quot;left = &quot; );
  Serial  .print (left);
  Serial  .print ( &quot; right = &quot; );
  Serial  .println (right);

  if  (left &amp;lt;  40  &amp;amp; left &amp;gt;  -40 ) {
    motor1-&amp;gt;run (RELEASE);
  }
  if  (right &amp;lt;  40  &amp;amp; right &amp;gt;  -40 ) {
    motor2-&amp;gt;run (RELEASE);
  }
  if  ( left&amp;gt;=40 ) {
    if  ( left&amp;gt;100 )  left=100 ;
      motor1-&amp;gt;run (FORWARD);
      motor1-&amp;gt;setSpeed (left * factor);
  }
  if  ( right&amp;gt;=40 ) {
    if  ( right&amp;gt;100 )  right=100 ;
      motor2-&amp;gt;run (FORWARD);
      motor2-&amp;gt;setSpeed (right * factor);
  }
  if  (left&amp;lt;=  -40 ) {
    if  ( left&amp;lt;-100 )   left=-100 ;
      motor1-&amp;gt;run (BACKWARD);
      motor1-&amp;gt;setSpeed (-left * factor);
  }
  if  (right&amp;lt;=  -40 ) {
    if  ( right&amp;lt;-100 )   right=-100 ;
      motor2-&amp;gt;run (BACKWARD);
      motor2-&amp;gt;setSpeed (-right * factor);
  }
}  // end motor 
 
 Explanation of the program code for the RC Car 
 After including the libraries for the Motor Shield V2 and IRremote, two motors are instantiated with the number at the terminal block of the controller and some global variables are declared (data type) and initialized (initial value). 
 In the function  setup()  the serial interface and the IR receiver are initialized and the pins for the power supply of the IR receiver are set up as outputs with the state HIGH or LOW. 
 In the function  loop()  first the signal of the IR remote control is received, then depending on the pressed key the code for the motor control is changed. The cursor keys up and down change the first digit, left and right the second digit of the code in the value range 1 to 9. The key X leads to standstill with code 5555. The third and fourth digit of the code are currently not yet significant. At the end, the self-defined function  motor()  is called without arguments, because we had defined the variables globally, i.e. valid in all functions. 
 In the self-defined function  motor() , which we will also use in other configurations with other remote controls, the speed steps for the left and right motor are determined from the code. The percentage value of the speed level is finally converted into the PWM value for  setSpeed  with the factor defined at the beginning. 
 &amp;nbsp;  
 Now the Robot Car is ready for use. Works fine as long as you can maintain the optical connection between remote control and IR receiver. However, when driving on the road, I have experienced that strong sunlight hinders reception. That&#039;s why I&#039;m switching to radio remote control. See you soon. 
                ]]>
            </content>

                            <updated>2022-06-09T07:30:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Alternately flashing LEDs on the Raspberry Pi microcontroller</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/alternately-flashing-leds-on-the-raspberry-pi-microcontroller</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/alternately-flashing-leds-on-the-raspberry-pi-microcontroller"/>
            <summary type="html">
                <![CDATA[
                
                                            It is also possible to connect the electronic components on the breadboard without a T-Cobbler. But then you need a jumper wire of the type female - male for the connection to the J6 connector strip of the Raspberry Pi...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 How to make two LEDs flash alternately on the Raspberry Pi? 
 You can connect the electronic components on the breadboard without a T-Cobbler. But then you need a jumper wire of type female - male for the connection to the J6 header of the Raspberry Pi, i.e. female for the Raspberry Pi and male for the breadboard. 
   
  The program code (alternately blinking LED on the Raspberry Pi)   
  # From here the code can be copied directly into the Python software. 
 # Black, colored = code and gray = explanations 
 #We start with importing the program modules 
import RPI.GPIO  as  GPIO
import  time 
GPIO.setmode(GPIO.BCM)  #We set the mode to BCM 
GPIO.setup (23 ,GPIO.OUT)  #Pin 23 is an output. 
GPIO.setup (24 ,GPIO.OUT) #Pin   24 is an output .
 # The loop starts here 
 try :
    while  True:  #While loop so that the program runs continuously 
        GPIO.output (23 ,GPIO.HIGH)  # Turns on the LED at pin 23 .
        GPIO.output (24 ,GPIO.LOW)  # Turns off the LED at pin 24 .
        time .sleep (1 )  # Wait 1 second 
        GPIO.output (23 ,GPIO.LOW)  # Turns off the LED on pin 23 .
        GPIO.output (24 ,GPIO.HIGH)  # Turns on the LED on pin 24 .
        time .sleep (1 )
 # Here at the end the program jumps to the start of the loop part. So.. 
 # ...switch on the LED at pin 23. 
 # ... etc... etc... etc.. 
except KeyboardInterrupt:  # With CTRL+C we interrupt the program 
    print ( &quot;Finished &quot;) # Write &quot;Finished&quot; into the shell window
    GPIO.cleanup() # Exit the program
  
 In example no. 01 Blinking LED we had implemented the infinite loop with while True and indentation of the following code lines. If you aborted this infinite loop with the key combination Ctrl-C, you will have noticed that firstly you get an error message and secondly the LED may still be on. To prevent these two unwanted effects, some lines of code have been added to this example. Before the while True loop the line  try:  is inserted. The colon leads to the indentation of the whole loop. If an error occurs in this loop while the program is running, there is no error message, but the program is continued at  except KeyboardInterrupt: . With the print command, the end of the program is output in the Python shell (lower window at Thonny), with GPIO.cleanup(), the GPIOs (i.e. our LEDs) are switched off and released for other purposes. 
 Example: Traffic light cycle on Raspberry Pi 
 Here is a proposed solution for a traffic light cycle using the module gpiozero: 
   
   
   
                ]]>
            </content>

                            <updated>2022-06-06T08:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Build RC Car for Arduino: Autonomous vehicle - part 1</title>
            <id>https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-1</id>
            <link href="https://funduinoshop.com/en/blog/projects/build-rc-car-for-arduino-autonomous-vehicle-part-1"/>
            <summary type="html">
                <![CDATA[
                
                                            Welcome to a new blog series about robot cars. In the first part we will get to know the basics of it, so to speak as a decision support for the purchase decision, which chassis, which microcontroller and which type of remote control...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  Understanding the mobility of the future with robot cars  
 Welcome to a new blog series about robot cars. In the first part, we will learn the basics of it, so to speak, to help you decide which chassis, microcontroller and type of remote control is best for you. 
 Two or four wheels - weighing the pros and cons for building RC cars for Arduino 
 Let&#039;s start with the chassis and look at the advantages and disadvantages of the inexpensive kits with two or four powered wheels. All of them have electric motors in common, so these alone are not a selection criterion. The two-wheeled robot cars are initially less expensive because they do not have the cost of two more electric motors and wheels. Instead, they have one or two support wheels, which give the RC cars great maneuverability. So if you want to &quot;step up to the plate&quot;, this is the way to go. However, in this price range of DC motors, you can&#039;t expect them to run smoothly with high precision. Therefore, the straight running is not as good as with the four-wheeled variant. Especially when starting up the motors show a higher tracking accuracy, but cornering is only possible with significantly larger radii. Another advantage of the four-wheeled chassis is more space for batteries, microcontroller, possibly DC/DC converter and sensors. 
   
 The choice of microcontroller for building an RC car 
 The next question is about the microcontroller and the way it is programmed. For example, the greatest computing power on the small chassis has a micro computer of the type Raspberry Pi. Especially in terms of remote control, the types with built-in WiFi and Bluetooth offer advantages and you can even transmit images from a Raspberry Pi camera. Programming is done in the widely used Python programming language, but the system startup of the Linux-based Raspberry Pi OS takes about a minute. Another drawback of the Raspis (short for Raspberry Pi) is the need for a good 5V power supply. This requires a good DC/DC converter. 
 In connection with the topic of Bluetooth remote control, an example with Raspberry Pi and the Android APP BlueDot by Martin O&#039;Hanlon (staff member of the Raspberry Pi Foundation) will be shown in a later episode. 
 Much faster is the system startup with a Micro Controller based on the ATmega 328, e.g. the  Funduino Uno  or  Funduino&amp;nbsp;Nano . About one second after power on you can start with the control inputs, no booting from microSD card, the program once uploaded is not forgotten. The input voltage can be between 5 and 9 volts. Programming is done in the  Arduino IDE , a development environment similar to C/C++ (For further explanation see  https://funduino.de/hardware-software) . Therefore, we will first look at examples with the Funduino Uno R3, for which perfect motor controllers are available as so-called shields. These are simply plugged onto the Uno and so-called libraries help us with the programming. 
 Excursus: What is a motor controller/motor driver? 
 Due to the very limited current at the outputs of the micro controllers, larger consumers - and this includes all kinds of electric motors and relays - require an external power supply and an electronic circuit that converts the control signal of the micro controller. However, the requirements for this integrated circuit are even higher: On the one hand, it should allow a variable speed of the motor, on the other hand, we also want to be able to change the direction of rotation of the motor by reversing the polarity. 
 Using the IC L293D as an example, we will now explain how it works. Basically this DIP component with sixteen &quot;legs&quot;/connections is sufficient as a motor controller for two electric motors.     
 The voltage supply of the IC is at the connections VCC1 and Ground. We can tap this voltage at the micro controller. The voltage supply of the motors is done via VCC2 and Ground. Here we connect the battery(ies) (e.g. 6 or 9 volts). For bigger motors the IC has to be cooled, for the small yellow ones from the kit not. 
 The one motor we connect to 1Y and 2Y, the corresponding control lines to the MCU (Micro Controller Unit) are 1A, 2A and 1,2EN. 
 Reversing the polarity of the motors to change the driving direction is basically done with a so called H-circuit. We implement this with our micro controller by placing two output pins (these go to 1A and 1B) at either HIGH or LOW. 
 The speed change is done as in  example no. 04 - pulsating LED  with pulse width modulation (PWM), i.e. the very fast switching on and off of the voltage. Therefore we need for the connection 1,2EN (&quot;Enable&quot;) a PWM capable output at the MCU (these are the pins with the tilde ~). 
 For the second motor, the connections 3A, 4A and 3,4EN are connected to pins of the MCU. 
 The right picture (Logic Diagram) explains how the IC works. We can see the four amplifiers that give the input signals 1A to 4A respectively with the battery voltage to the outputs 1Y to 4Y. However, this is only done if the PWM inputs 1,2EN and 3,4EN are also switched HIGH. 
 Two of these ICs L293D are installed on the Motor Shield V1, so that up to four motors can be connected here. 
 To avoid using too many pins, there is a so-called shift register (SN74HC595) in the middle of the Motor Shield V1. To explain how it works would go beyond the scope of this article. Fortunately, the colleagues of the New York company Adafruit did most of the programming work for us and provided a library to control the motors easily.    
 Picture Motor Shield V1 with modification:   Soldered socket connectors (female connectors) for connecting additional equipment 
 &amp;nbsp; 
 The Motor Shield V2 can also control up to four motors and uses a similar IC, but for the connection of the control lines the so-called I2C bus with the connections SDA (=Serial Data) at the analog input A4 and SCL (=Serial Clock) at A5. Adafruit has also developed and provided a suitable program library for this purpose. 
   
 Picture Motor Shield V2 with modification:  Soldered socket connectors (female connectors) for connection of additional equipment 
 On both Motor Shields additional female connectors are soldered in order to connect Bluetooth or 433 MHz transmitters/receivers or sensors later. More about this in one of the following blog posts. 
 Power supply and control for an RC Car for Arduino microcontroller 
 If we want our robot car to drive independently, we have to disconnect it from the USB port of the PC. This means that the power supply will be lost as well. From now on, the command center (MCU) and electric motors will be powered by batteries or rechargeable batteries. Here, the motors are by far the larger consumers. The battery holder that comes with most kits is for four Mignon (AA) batteries, i.e. 6 volts for MCU and motors. If you want to use rechargeable batteries, you should use either six Mignon (AA) batteries or two 18650 lithium-ion batteries because of the lower voltage. 
 For control, in the next episodes we will first learn about remote controllers with infrared remote control, Bluetooth transceivers with smartphone APP or a second micro controller also with BT transceiver HC-05, and radio remote controllers with 433Mhz and 2.4 GHz. The blog series will conclude with aspects of autonomous driving, primarily obstacle detection. See you soon. 
 &amp;nbsp; 
                ]]>
            </content>

                            <updated>2022-06-03T11:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Flashing LED on Raspberry Pi microcontroller</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/flashing-led-on-raspberry-pi-microcontroller</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/flashing-led-on-raspberry-pi-microcontroller"/>
            <summary type="html">
                <![CDATA[
                
                                            Unlike the Arduino, the Raspberry Pi does not have access to the built-in LEDs. They only indicate power supply and access to the µSD card. To make an LED blink, an external LED with a power supply is needed....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 How to make a LED blink on the Raspberry Pi? 
  Unlike the Arduino, you don&#039;t have access to the built-in LEDs on the Raspberry Pi. They only show power supply and access to the µSD card.  
 To make a LED blink, you need an external LED with a suitable series resistor and jumper cables. The most sensible way is to build the circuit on a breadboard with a T-Cobbler. This kind of arrangement also facilitates later experiments with several LEDs, pushbuttons and sensors. The programming is done in the programming language Python. 
 The circuit diagram (blinking LED on Raspberry Pi) 
   
 What is an LED? 
 LED stands for Light Emitting Diode. The last word indicates the electronic properties. A diode is a semiconductor that lets the current through only in one direction, and blocks it in the other direction. The two &quot;legs&quot; are called anode and cathode. If you look closely, you can see that the legs are of different lengths. The positive voltage is applied to the longer leg, the anode; the shorter leg, the cathode, is connected to ground via a resistor. The resistor is necessary because of another property of diodes. First of all, a minimum voltage is required for any current to flow at all: This is called forward voltage. At higher voltages the diode becomes fully conductive. Therefore you need a series resistor to limit the current, because the pins of the micro controllers and also of the Raspberry Pi should be charged with a maximum of 15 to 20 mA. We use series resistors in the range of 100 to 330 Ω (Ohm). 
 The programming language Python can be extended by program modules, similar to C/C++ with libraries. For our blinking LED we need two of these modules: first &quot;time&quot; to set the blinking duration. And secondly a module to access the GPIOs (General Purpose Input/Output). 
 How do I control an LED with a Raspberry Pi? 
 Importing the modules is done at the beginning of the Python program; you have several options to do this. Examples: 
 The following line imports the module  time : 
  import   time  
 When calling the method  sleep  , the module name  time  must be prefixed with a dot: 
  time  .sleep  (1 ) 
 In contrast to delay(), where the time interval is specified as argument in milliseconds,  time.sleep()  specifies the values in seconds, possibly with decimal point. 
  import  RPi.GPIO  as  GPIO 
 This simplifies the calls to the methods in the program, e.g. 
  GPIO  .setmode  (GPIO  .BCM ) 
 Third example for another module for GPIO access: 
 from gpiozero  import  LED 
 From the module  gpiozero  only the class LED is imported. With this import method, the module name is no longer prepended when the method/function is called. 
 Example programs to control a LED with a Raspberry Pi microcontroller 
 First example with the module RPi.GPIO: 
 import RPi.GPIO as GPIO
import  time 
GPIO.setmode(GPIO.BCM) # pin name for Broadcomm processor 
GPIO.setup (26 ,GPIO.OUT) # GPIO26 (=phys. pin 37) becomes output 

 while  True: # endless loop, abort with Ctrl-C 
    GPIO .output  (26  ,1 ) # GPIO 26 is switched HIGH 
    time  .sleep  (1 )
    GPIO .output  (26  ,0 ) # GPIO 26 is switched LOW 
    time  .sleep  (1 )
 
 Second example with the module gpiozero. Only  LED  and  sleep  are imported. 
  from  gpiozero import LED
 from   time  import  sleep 
redLED = LED (26 ) # redLED is instantiated at GPIO  26  

 while   True :
    redLED.on() # redLED is switched on 
    sleep  (1 )
    redLED.off() # redLED is  switched off 
    sleep  (1 )
 
 Challenge: Extend circuit and program for a traffic light cycle, e.g. red(3s), red/yellow(1s), green(3s), yellow(1s), restart with red. 
 Suggested solution see no. 02 The alternating blinker 
                ]]>
            </content>

                            <updated>2022-06-01T00:45:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Getting Started with the Raspberry Pi - Part 3: Programming</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-3-programming</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-3-programming"/>
            <summary type="html">
                <![CDATA[
                
                                            Basically, you can also install the Arduino IDE on the Raspberry Pi or use the pre-installed program Geany, a very functional editor, in different programming languages....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 In principle, you can also install the Arduino IDE on the Raspberry Pi or program in different programming languages with the pre-installed program Geany, a very functional editor, but the Raspberry Pi takes its name from the Python programming language; originally it was only planned as a  Python   interpreter . So: Who says programming the Raspberry Pi, usually means the very widely used and easy to learn language Python. 
 In the last few years, the program Thonny has established itself as an Integrated Development Environment (IDE) for Python  programs . 
 &amp;nbsp;  
 One differentiates basically the editor in the upper part of the window, here the programs are written, and the Shell in the lower part, here the programs with possible inputs and outputs run. One can enter however also in the Shell directly short commands. 
 Advanced programmers should click on &quot;Switch to regular mode&quot; in the upper right corner of the screen to get the menu bar displayed as well. 
 &amp;nbsp;  
 If you want to learn the programming language autodidactically, you can do this with the help of a lot of books. At this point the method &quot;learning by doing&quot; is recommended, i.e. simply copy the program examples. Mostly the program code is self-explanatory. That is the beauty of Python. 
 In order to avoid unnecessary frustration, a few rules should be mentioned at this point, which are primarily aimed at those switching from Arduino C/C++: 
 The variable type does not have to be declared, in contrast to C/C++. Python recognizes the type the first time it is used. For example, if you type  (&quot;abc&quot;)  in the shell, you get &amp;lt;class &#039;str&#039;&amp;gt; as output; so the type string is recognized because of the apostrophes. 
 The command line is not terminated with a semicolon. Instead, Python requires careful attention to indentation. So: every command always starts at the first position of the paragraph. 
 Indentations (usually tab=four spaces) are done (mostly automatically) for branches, loops or self-defined functions, if necessary several times. 
 Program and variable names always start with a letter or the underscore _. After that, numbers can also be used. The underscore is the only special character allowed and is mostly used for special purposes. 
 As said before: More explanations about Python with the program examples. 
                ]]>
            </content>

                            <updated>2022-05-24T11:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Getting Started with the Raspberry Pi - Part 2: Hardware and Software</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-2-hardware-and-software</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-2-hardware-and-software"/>
            <summary type="html">
                <![CDATA[
                
                                            A short introduction to the most important components for the Raspberry Pi. Whether plug-in cable, resistor or LED, we show you which components you need to get started. In addition, we go into the installation of the software for the Raspberry Pi and...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Hardware and Software for the Raspberry Pi 
 Hardware for the Raspberry Pi 
     
 Basic accessories for the Raspberry Pi 
 In addition to sensors and actuators, you need&amp;nbsp; plug-in cables &amp;nbsp;in connection with a&amp;nbsp; breadboard as a basis for fast and flexible experimental setups. This saves time-consuming soldering work. Furthermore&amp;nbsp; light emitting diodes &amp;nbsp;are very suitable to check the signal output of the board. 
 The Breadboard 
 A breadboard is a good tool to build circuits without soldering. In a breadboard there are always several contacts connected in a row. Therefore, many cables can be connected to each other at these points without soldering or screwing. 
 The following picture shows in color which contacts are connected to each other. 
 &amp;nbsp;  
 Standard plug-in board for Raspberry Pi and microcontroller.   The green lines in the picture show the course of the traces. 
 For a good connection of the Raspberry Pi to the breadboard there are so called T-Cobbler with a ribbon cable leading out all 40 pins. 
   
 Light emitting diode (LED) for the Raspberry Pi 
 LEDs are a very fast way to test the results of a project. Therefore they are useful for almost all Arduino projects. You can read a lot about LEDs on the net. Here are only the most important infos. 
   
 
 The current can only flow through the LED in one direction. Therefore it must be connected correctly. A LED has a longer and a shorter contact. The longer contact is + and the shorter one is -. 
 An LED is designed for a certain voltage. If this voltage is undershot, the LED lights up less brightly or it remains off. However, if the voltage is exceeded, the LED burns out very quickly and becomes very hot at the contacts (CAUTION!). 
 Typical voltage values according to LED colors: Blue:3.1V, White:3.3V, Green:3.7V, Yellow:2.2V, Red:2.1V The voltage at the board&#039;s Digital Ports is 5V. When connected directly to these ports, each LED gives up the ghost quite fast. Therefore a resistor must be connected into the circuit. In the internet you can find very good help under the search term &quot;Widerstandsrechner LED&quot;. 
 Non-binding recommendation for resistors at the following LEDs (When connected to the 5V pins of the microcontroller board.   
 
 
 
 
 LED 
 White 
 Red 
 Yellow 
 Green 
 Blue 
 Infrared (IR) 
 
 
 Resistance 
 100 Ohm 
 200 Ohm 
 200 Ohm 
 100 Ohm 
 100 Ohm 
 100 Ohm 
 
 
 
 &amp;nbsp; 
 Plug-in cable or jumper wire for the Raspberry Pi 
 The jumper wires are available in different versions, mostly in 10cm or 20cm length with plugs as well as with sockets. Here mm=male-male=plug on both sides, mf=male-female=plug on one side, socket on the other side, and ff=female-female= with sockets on both sides. 
   
 Pushbuttons and switches for the Raspberry Pi 
 The first and simplest sensor is the button, a spring-loaded switch that reopens the electrical contact when released. 
   
 Software for the Raspberry Pi 
 The operating system Raspberry Pi OS can be downloaded for free from the  homepage of the Raspberry Pi Foundation . The 32-bit version is currently identical for all models. For writing to the µSD card (8 to 32 GB) on the PC, the program Imager is recommended, which can also be downloaded from the Foundation&#039;s homepage. 
 Installing the software 
   
 Starting up the Raspberry Pi 
 At the first startup the operating system is set up. Among other things, the access data for the home WLAN is entered. Since spring, the user name pi is no longer used automatically, but you are asked to enter a user name and a password. After a restart at the end of the initialization, a graphical user interface starts. This process takes a little longer than a minute. 
 When clicking on the icon, one is asked if one only wants to have the possible updates displayed or if one wants to start them directly. 
 The following screenshot was taken with the pre-installed program &quot;scrot&quot; (for  screen  shot ). 
 &amp;nbsp;  
                ]]>
            </content>

                            <updated>2022-05-22T12:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Getting Started with the Raspberry Pi - Part 1</title>
            <id>https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-1</id>
            <link href="https://funduinoshop.com/en/blog/raspberry-pi/getting-started-with-the-raspberry-pi-part-1"/>
            <summary type="html">
                <![CDATA[
                
                                            This guide is intended to serve as a foundation for learning the Raspberry Pi OS with a focus on the Python programming language. It is intended to provide beginners with a simple, interesting and closely guided introduction to...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  What actually is &quot;Raspberry Pi&quot;?  
 This tutorial is intended to serve as a basis for learning the Raspberry Pi OS with a focus on the Python programming language. It is intended to give beginners a simple, interesting and closely guided introduction to the topics &quot;Computational Thinking&quot; and &quot;Physical Computing&quot;. The tutorial is mainly oriented towards practical tasks with a theoretical introduction beforehand. It is essential to read this beforehand in order not to fail in the later practical tasks due to trivialities. 
 This manual was developed in the context of a teaching activity. It can be used free of charge to learn the basics about Raspberry Pi computers, but cannot be copied or used in any other way without permission. The tutorial has been carefully created and is continuously maintained, but no guarantee is given for its correctness and completeness. 
 For the practical tasks you should be provided with some electronic components. On the website funduinoshop.de you can order suitable sensor sets, which are specially designed for these instructions. 
 The Raspberry Pi with meanwhile a variety of different models is in contrast to the micro controller (e.g. Funduino Uno or Nano) a real computer with a Linux-based operating system (Raspberry Pi OS, formerly Raspbian). The operating system as well as application programs and data are located on a µSD card (8 to 32 GB), which is loaded at startup. The most important interfaces are first the USB sockets for keyboard and mouse as well as the HDMI interface(s) to the monitor.    
 Raspberry Pi B (2012) 
 The great success of the Raspberry Pi is based both on programming with the widely used Python programming language and on the possibility of connecting electronic components to the 40-pin J6 header (often called GPIO header). This is identical for all models since 2014. When it comes to nomenclature, you have to be careful whether you mean the physical pin (in the picture on the left the odd numbers from 1 to 39, on the right the even numbers from 2 to 40) or the GPIO designation. For example, the physical pin 11 corresponds to GPIO17 (General Purpose Input Output connector 17 of the processor). GPIOs are therefore digital inputs or outputs, as in the case of the micro controller. 
   
 Figure J6 header: 40 pins, of which 2x3.3V, 2x5V, 8xGround, 26xGPIOs, 2 reserved 
  Some of the pins have a secondary assignment as electronic interface, e.g. One Wire at pin 7, I2C (= Inter-Integrated Circuit) at pins 3 and 5, UART (= Universal Asynchronous Receiver and Transmitter) at pins 8 and 10 and SPI (=Serial Peripheral Interface) at pins 19, 21, 23 and 24 or 26. This secondary assignment is defined in the operating system in the Raspberry Pi configuration. More about this in the respective examples. 
                ]]>
            </content>

                            <updated>2022-05-19T13:30:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">Level converter in microelectronics</title>
            <id>https://funduinoshop.com/en/blog/knowledge/level-converter-in-microelectronics</id>
            <link href="https://funduinoshop.com/en/blog/knowledge/level-converter-in-microelectronics"/>
            <summary type="html">
                <![CDATA[
                
                                            Often in electronic circuits two devices or modules are to communicate with each other. Even more often, these two modules require a different voltage level. In microelectronics...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Where are level converters used in microelectronics? 
 Often two devices or modules are to communicate with each other in electronic circuits. Even more often, these two modules require a different voltage level. In microelectronics, for example in an Arduino microcontroller, this voltage level is usually 3.3V or 5V. If one were to directly connect a module operating at 3.3V and a module operating at 5V, the module with a maximum operating voltage of 3.3V would be destroyed with a 5V level applied.&amp;nbsp; 
 So that exactly this is avoided, one falls back to so-called level converters. Level converters allow the communication between two modules with different voltage levels. It is particularly interesting that level converters work in two directions without having to change anything on the connection. The signal can therefore be sent from one module to the other. Level converters are therefore also suitable for I2C lines. Furthermore it is possible to raise or lower the voltage level of switch inputs or switch outputs.&amp;nbsp; 
   
 Level converters: How do they work? 
 The picture above shows very well how the signal transmission inside a level converter for 3.3 and 5V works. On the board, the 5V level (HV, &quot;High Voltage&quot;) and the 3.3V level (LV, &quot;Low Voltage&quot;) are directly opposite each other. It should be noted that the module used in this example (article is linked below) can only &quot;switch&quot; a few milliamps. The module is not suitable for switching motors or lamps, for example. 
                ]]>
            </content>

                            <updated>2022-05-17T00:15:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">The MPU-6050 module: Gyroscope and accelerometer</title>
            <id>https://funduinoshop.com/en/blog/arduino/the-mpu-6050-module-gyroscope-and-accelerometer</id>
            <link href="https://funduinoshop.com/en/blog/arduino/the-mpu-6050-module-gyroscope-and-accelerometer"/>
            <summary type="html">
                <![CDATA[
                
                                            There are only a few modules on the market that have triggered such a hype in the last few months as the MPU-6050 module. The two-in-one circuit board combines two popular...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 There are only a few modules on the market that have generated as much hype in recent months as the MPU-6050 module. The two-in-one board combines two popular sensor features: The module can be used as a gyroscope as well as an accelerometer at the same time.  How so? The sensor includes a 3-axis gyroscope and a 3-axis accelerometer on one and the same chip. This allows&amp;nbsp;to retrieve all (!) sensor values simultaneously. Thus, the hobbyist is always well informed about the current sensor position. This feature is particularly interesting for model building, especially for balancing chassis or drones. can also access external magnetometers or other sensors via an additional master I2C bus, so that these sensor data can also be fully recorded.&amp;nbsp; 
 A quick overview of the sensor data of the MPU-6050 (GY-521): 
 
 Chipset: MPU-6050 (also known as GY-521) 
 Power supply: 3.3 - 5V DC 
 Line of freedom: 6* 
 Interface: I2C 
 Pin spacing: 2.54 mm   
 
 Now we come to the exciting part: the practice. To give you a nice overview of the useful functions of the MPU-6050 module, we have developed an example circuit diagram for you. The MPU-6050 module is read out by a Funduino UNO R3 and the collected data is evaluated.  We are primarily interested in the sensor data of the gyroscope. We want to read out the values of the X-, Y- and Z-axis and determine if a change of the sensor position has taken place. The change of the position should be displayed to us with colored LEDs. 
   
 So far, so good: but how do we implement this? 
 The program code of the MPU-6050 module 
 Now we get down to the nitty-gritty: well, half of it. First we have to download the appropriate library for the MPU6050 module and integrate it into our Arduino IDE. The library is called &quot;&amp;lt;MPU6050_tockn.h&amp;gt;&quot; and can be found and installed directly from the library management of the Arduino IDE. 
 After this first step we start with the actual code. First, we define the LED connections for our LEDs, which will serve us as indicators for the axis position. Then we define two variables for the axis position of each of the three axes.&amp;nbsp; 
 Surely you ask yourself why we need two variables per axis. Since we want to determine whether the position of the respective axis has changed, we must first determine which value the sensor has recorded for the current position. We save this sensor value of the MPU-6050 for a short period of time in the first variable. In the second variable, the value of the axis position is saved again a little later. We can now compare the two recorded measured values with each other. If a deviation of the position by a previously defined minimum value has been detected (in our code example +-3), we can assume that the sensor has changed the position. In this case we switch on the assigned LED.&amp;nbsp; 
 Especially nice: the captured measurement data can be displayed well in the serial plotter of the Arduino IDE.   
  // This sketch compares the angles of the X/Y/Z axes with the previous values. 
 // If they are different by +/-3°, the sketch switches LEDs. (jew.1 for POS or for NEG) 
 // Attention: These are not the absolute values but RELATIVE values compared to the previous measurement 


  #include   &amp;lt;MPU6050_tockn.h&amp;gt;   // include libraries  
  #include   &amp;lt;Wire.h&amp;gt;   // &amp;lt;-  

MPU6050 mpu6050 (Wire ,  0.1 ,  0.1 );  // Attenuate values. The smaller (direction &quot;0&quot;), the more nervous the values- 
                                  // the bigger (direction &quot;1&quot;) the more sluggish the values 

 const   int  ledXpos  =2 ;  //*** 
 const   int  ledXneg  =3 ;  // * 
 const   int  ledYpos  =4 ;  // * define the LED connections 
 const   int  ledYneg  =5 ;  // *
 const   int  ledZpos  =6 ;  // *
 const   int  ledZneg  =7 ;  //*** 

 int  xNowPos;  // variable CURRENT X-Pos 
 int  yNowPos;  // Variable CURRENT Y-Pos 
 int  zNowPos; // Variable CURRENT   Z-Pos 

 int  xPrePos;  // Variable PREVIOUS X-Pos 
 int  yPrePos;  // Variable PREVIOUS Y-Pos 
 int  zPrePos;  // Variable PREVIOUS Z-Pos 

 int  difference =  3 ;

 void    setup() { // Start setup function 
  Serial  .begin  (115200 );  // Open serial transmission (115200Baud) !!! Setup at the monitor as well !!! 
  
  pinMode (ledXpos,  OUTPUT );  //*** 
  pinMode (ledXneg,  OUTPUT );  // * 
  pinMode (ledYpos,  OUTPUT );  // * Set that LED connectors are outputs 
  pinMode (ledYneg,  OUTPUT );  // *
  pinMode (ledZpos,  OUTPUT );  // *
  pinMode (ledZneg,  OUTPUT );  //*** 
  
  Wire  .begin ();  // Start I2C protocol 
  mpu6050 .begin ();  // Start gyro 
  mpu6050.calcGyroOffsets();  // Gyro calculates its offsets !!! Meanwhile leave it quiet !!! 
                                // Use mpu6050.calcGyroOffsets(true) to track it in the serial monitor. 
 delay  (1000 );  // That&#039;s what we&#039;re waiting for ...
}

 void   loop () {  // Start of the loop loop 

  mpu6050.update();  // Create new data set in the gyro 

xNowPos=(mpu6050.getGyroAngleX());  // Request new record from gyro, write to X variable 
yNowPos=(mpu6050.getGyroAngleY());  // Request new data set from gyro, write to Y variable 
zNowPos=(mpu6050.getGyroAngleZ());  // Request new record from gyro, write to Z variable 

 if  (xNowPos &amp;lt; xPrePos-(difference))  // Compare old dataset with new one. Difference &amp;lt; -3 ? 
 {digitalWrite (ledXpos,  LOW );  digitalWrite (ledXneg,  HIGH );}  // Then switch LEDs accordingly 
 else   if  (xNowPos &amp;gt; xVorPos+(difference))  // Compare old data set with new one. Difference &amp;lt; +3 ? 
 {digitalWrite (ledXpos,  HIGH );  digitalWrite (ledXneg,  LOW );}  // Then switch LEDs accordingly 
 else   // Or just turn off all X LEDs ...
 {digitalWrite (ledXpos,  LOW );  digitalWrite (ledXneg,  LOW );}  // Then switch LEDs accordingly

 if  (yNowPos &amp;lt; yPrePos-(difference))  // Compare old data set with new one.   Difference &amp;lt; -3 ? 
 {digitalWrite (ledYpos,  LOW );  digitalWrite (ledYneg,  HIGH );}  // Then switch LEDs accordingly 
 else   if  (yNowPos &amp;gt; yVorPos+(difference))  // Compare old data set with new one. Difference &amp;lt; +3 ? 
 {digitalWrite (ledYpos,  HIGH );  digitalWrite (ledYneg,  LOW );}  // Then switch LEDs accordingly 
 else   // Or just turn off all Y LEDs ...
 {digitalWrite (ledYpos,  LOW );  digitalWrite (ledYneg,  LOW );}  // Then switch LEDs accordingly

 if  (zNowPos &amp;lt; zPrePos-(difference))  // Compare old data set with new one.   Difference &amp;lt; -3 ? 
 {digitalWrite (ledZpos,  LOW );  digitalWrite (ledZneg,  HIGH );}  // Then switch LEDs accordingly 
 else   if  (zNowPos &amp;gt; zPrePos+(difference))  // Compare old data set with new one. Difference &amp;lt; +3 ? 
 {digitalWrite (ledZpos,  HIGH );  digitalWrite (ledZneg,  LOW );}  // Then switch LEDs accordingly 
 else   // Or just turn off all Z LEDs ...
 {digitalWrite (ledZpos,  LOW );  digitalWrite (ledZneg,  LOW );}  // Then switch LEDs accordingly

xVorPos=xJetztPos;  // Update the (so far) old data set 
yVorPos=yJetztPos;  // Update the (so far) old data set 
zVorPos=zJetztPos;  // Update the (previously) old record 
                                     // Then, in the next run, it can be compared against &quot;before&quot; again 

 Serial  .print (xNowPos);  // &amp;gt;&amp;gt; serial plotter&amp;lt;&amp;lt; fair notation [output X] 
 Serial  .print ( &quot; &quot; ) ;Serial . print (yNowPos);  // (&quot; &quot;) = (\t) = New color [output Y] 
 Serial  . print( &quot; &quot; ) ;Serial . println (zNowPos);  // (&quot; &quot;) = (\t) = New color [output   Z] 
  delay  (15 );  // (minimal delay calms down the serial output) 
}  // end of loop 


 // Feel free to experiment a bit with the damping in the third program line 
 //-&amp;gt; MPU6050 mpu6050(Wire, 0.3, 0.3); 
 // or with the delay() at the end. Afterwards observe the values in the &amp;gt;&amp;gt;serial PLOTTER &amp;lt;&amp;lt;  
                ]]>
            </content>

                            <updated>2022-05-15T08:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">PWM speed controller in microelectronics</title>
            <id>https://funduinoshop.com/en/blog/knowledge/pwm-speed-controller-in-microelectronics</id>
            <link href="https://funduinoshop.com/en/blog/knowledge/pwm-speed-controller-in-microelectronics"/>
            <summary type="html">
                <![CDATA[
                
                                            Before the development of power electronics, the speed control of (brushed) DC motors was solved with linear regulators or series resistors. Figuratively speaking, the...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Origin of PWM speed controllers 
 Before the development of power electronics, speed control&amp;nbsp;of (brushed) DC motors was solved with linear regulators or&amp;nbsp;series resistors. Figuratively speaking, one reduced the voltage&amp;nbsp;(and thereby also the current) to change the speed. 
 However, this has some disadvantages, which become apparent especially in battery operation&amp;nbsp;. Voltage and current are converted into (unused) heat energy (&quot;burned&quot;) at the control unit (or&amp;nbsp;the resistor). 
 The total consumption remains very high, while the usable&amp;nbsp;power becomes less.&amp;nbsp;Since the torque depends on the current flow, this also collapses. 
 How PWM speed controllers work 
 With (further) development of power electronics, people have approached the problem with a&amp;nbsp;different idea.&amp;nbsp;By (very) quickly switching the supply voltage&amp;nbsp; on and off, one &quot;pulses&quot; the voltage (and thus the current).&amp;nbsp;No power is dropped at the (electronic) switch during the &quot;OFF&quot; time.&amp;nbsp;As a result, (almost) no more losses occur at the controller. 
 During the &quot;ON&quot; time, the FULL voltage is applied to the motor. As a result,&amp;nbsp;the current - and thus the torque - is correspondingly high.&amp;nbsp;Unfortunately, a motor with its coils and the iron core is not an ideal&amp;nbsp;ohmic consumer, which is why this statement is not&amp;nbsp;completely correct from a physical point of view.&amp;nbsp; 
 However, the combination of coil inductance and motor inertia helps&amp;nbsp;smooth the speed, so the motor behaves as&amp;nbsp;if&amp;nbsp;it were operated with continuous DC voltage. 
 &amp;nbsp; 
   
 &amp;nbsp; 
 This brings us to the disadvantages of pulse width modulation.&amp;nbsp;Modulation with a square wave voltage leads to the emission of&amp;nbsp;multiple radio frequencies. This results in EMC interference, which can lead to treacherous errors, especially with&amp;nbsp;controllers. 
 In the low PWM frequency range (1-2kHz) there are unpleasant&amp;nbsp;whistling noises at the motor.&amp;nbsp;One could now simply increase the switching frequency further.&amp;nbsp;But then the current does not have enough time to reach its maximum state&amp;nbsp;in the coil/winding.&amp;nbsp;It then oscillates between two non-stable state values, which leads to&amp;nbsp;a current ripple. 
 Excessive current ripple increases heating in the winding package,&amp;nbsp;which decreases motor performance and affects motor life&amp;nbsp;. 
 ... quite a lot of physics for a small component. 
 Now the good news:&amp;nbsp;For motors in the power class, these disadvantages are quite&amp;nbsp;acceptable. Let&#039;s be happy about the previously described advantages. 
                ]]>
            </content>

                            <updated>2022-05-12T09:00:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">The PN532 NFC RFID Module - Near Field Communication</title>
            <id>https://funduinoshop.com/en/blog/arduino/the-pn532-nfc-rfid-module-near-field-communication</id>
            <link href="https://funduinoshop.com/en/blog/arduino/the-pn532-nfc-rfid-module-near-field-communication"/>
            <summary type="html">
                <![CDATA[
                
                                            In this article we would like to show you how to read ID tags. The focus of the article is the PN532 NFC RFID module. The module is based on the NXP PN532 chip. This chipset is mainly used in the field of NFC (Near Field Communication)....
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 RFID? NFC? What is it? 
 In this article we would like to show you how to read ID tags. The focus of the article is the PN532 NFC RFID module.&amp;nbsp; 
 The module is based on the NXP PN532 chip. This chipset is widely used in the field of NFC (Near Field Communication). An NFC-enabled object, often a check card with an NFC chip, is held up to an NFC reader. This allows information to be exchanged in a fraction of a second.&amp;nbsp; 
 Does that sound abstract? If you have a newer EC card and use it for contactless payment, then you know NFC even from everyday life. By placing the card on the card terminal, the transaction is initiated - quickly and easily. 
 We would like to take a closer look at the technical processes behind this. The PN532 module is ideally suited for this purpose, as it is both I2C and SPI capable. The desired type of communication can be selected directly on the board of the PN532 by flipping the switches on it. The required switch position of the respective interfaces very you to the right of the circuit diagram, which is located a little further down the page. 
 &amp;nbsp; 
 The schematic: 
   
 Tip: A high resolution version of this picture can be found  here . There you can see the pinout a bit better.   
 The program code (I2C version) 
  //******************************************************************************************************* 
 //** Example sketch for reading ID tags. With matching ID PIN 13 is switched on for 2 seconds ** 
 //** is switched on (LED). If ID is wrong, a tone is generated at pin 12. (PASSIVE buzzer / piezzo) ** 
 //** use. Instead of an LED, a door lock can also be switched (via TIP120 switching amplifier ** 
 //******************************************************************************************************* 

  #include   &amp;lt;Wire.h&amp;gt;   // Library for I2C protocol  
  #include   &amp;lt;Adafruit_PN532.h&amp;gt;   // Library for the NFC/RFID module !  !! Please load by Arduino IDE !!!  


  #define  PN532_IRQ (2)  // Define the IRQ port  
  #define  PN532_RESET (3)  // Define the Reset connector  

 const   int  AlarmPin =  12 ;  // Pin 12 output for piezo speaker 
 const   int  OutputPin =  13 ;  // Pin 13 output for LED or via TIP120 to a magnetic lock 
 unsigned   long  cardid;  // Variable for the read TAG ID 

 unsigned   long  TAGid1 =  1702536620 ;  // IDs to be accepted can be entered here 
 unsigned   long  TAGid2 =  4070796058 ;  // Otherwise leave blank. The ID of single TAGs can be specified with 
 unsigned   long  TAGid3 ;  // the serial monitor (set 115200 baud) 

Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET);  // Create instance with I2C protocol 


 void    setup() { // start setup function 
  pinMode (AlarmPin,  OUTPUT );  // define PIN as output 
   pinMode (OutputPin,  OUTPUT );  // Define PIN as output 
  Serial  .begin  (115200 );  // Open serial transmission with 115200 baud (ser monitor same baud setting!) 
  Serial  .println ( &quot;Hello!&quot; );  // Send text &quot;Hello!&quot; to serial monitor 
  nfc .begin ();  // Start communication with RFID reader 
  unsigned   long  versiondata = nfc.getFirmwareVersion();  // Read version number of firmware 
  if  (! versiondata) {  // If no response is received 
    Serial  .print ( &quot;Can&#039;t find board ! &quot;);  // Send text &quot;Can&#039;t find...&quot; to serial monitor 
    while  (1 );  // so long stop 
  }

  Serial  .print ( &quot;Chip PN5 found&quot; );  Serial  .println ((versiondata &amp;gt;&amp;gt;  24 ) &amp;amp;  0xFF , HEX);  // Send text and version info to serial monitor
  Serial  .print ( &quot;Firmware ver. &quot; );  Serial . print ((versiondata &amp;gt;&amp;gt;  16 ) &amp;amp;  0xFF , DEC);  // Monitor if response from board is received 
  Serial  .print ( &#039;.&#039; );  Serial . println ((versiondata &amp;gt;&amp;gt;  8 ) &amp;amp;  0xFF , DEC);  //  
  
  nfc.SAMConfig();  // Configure board to read RFID tags 

  Serial  .println ( &quot;Waiting for an ISO14443A chip . ..&quot;);  // Send text that waiting to serial monitor 
}


 void   loop () {  // Start loop function 
  uint8_t success;  // Create variable 
  uint8_t uid[] = {  0 ,  0 , 0, 0,  0  };  // Buffer to store the UID 
  uint8_t uidLength;  // Length of the UID (4 or 7 bytes depending on ISO14443A card/chip type) 

  // Wait for an ISO14443A chip. If one is detected, the variable 
  // will be filled with the UID. Depending on the length (4 bytes (Mifare Classic) or 
  // 7 bytes (Mifare Ultralight) the card type is detected. 
  
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &amp;amp;uidLength);

  if  (success) {  // If detected, work off ....
    Serial  .println ( &quot;Found an ISO14443A card&quot; );
    Serial  .print ( &quot; UID Length: &quot; );  Serial . print (uidLength, DEC);  Serial . println ( &quot; bytes&quot; );
    Serial  .print ( &quot; UID Value: &quot; );
    nfc.PrintHex(uid, uidLength);  // print information to serial monitor 

    if  (uidLength ==  4 ) {  // If the card/chip has 4 byte length ....
                                                           // Mifare Classic card 
      cardid = uid [0 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // Set the 4 byte blocks 
      cardid |= uid [1 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // to a single block 
      cardid |= uid [2 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // together 
      cardid |= uid [3 ];  // 
      Serial  .print ( &quot;Appears to be a Mifare Classic #&quot; );  // 
      Serial  .println (cardid);  // Output the information 
      Serial  .println ( &quot;&quot; );  //  
      Serial  .println ( &quot;&quot; );  //  
    }
      if  ((cardid) == (TAGid1)||(cardid) == (TAGid2)||(cardid) == (TAGid3))  // Query whether the TAGs 1..2..3 with the respective 
 {digitalWrite (OutputPin ,HIGH );  // matches. Then switch depending on the 
 delay  (2000 );
 digitalWrite (OutputPin ,LOW );}  // on or off 
 else 
 {tone (AlarmPin,  1000 );  // And output a tone/frequency if necessary 
 delay  (4000 );
 noTone (AlarmPin);}
    }  // End of IF query/loop 
}  // End of the loop  
 The program code (SPI version) 
  //******************************************************************************************************* 
 //** Example sketch for reading ID tags. If the ID matches, PIN 13 will be ** for 2 seconds 
 //** is switched on (LED). If ID is wrong, a tone is generated at pin 12. (PASSIVE buzzer / piezzo) ** 
 //** use. Instead of an LED, a door lock can also be switched (via TIP120 switching amplifier ** 
 //******************************************************************************************************* 

  #include   &amp;lt;Wire.h&amp;gt;   // library for I2C protocol  
  #include   &amp;lt;SPI.h&amp;gt;   // Library for SPI protocol  
  #include   &amp;lt;Adafruit_PN532.h&amp;gt;   // Library for the NFC/RFID module !!! Please load by Arduino IDE !!!  

 const   byte  PN532_SCK =  2 ;  // 
 const   byte  PN532_MOSI  =3 ;  // Define the connections for  
 const   byte  PN532_SS =  4 ;  // the SPI connection to the RFID  
 const   byte  PN532_MISO  =5 ;  // board 

 const   int  AlarmPin =  12 ;  // define  the connections for 
 const   int  OutputPin =  13 ;  // the (switching) outputs 
 unsigned   long  cardid;  // variable for the read TAG-ID 

 unsigned   long  TAGid1 =  1702536620 ;  // IDs to be accepted can be entered here 
 unsigned   long  TAGid2 =  4070796058 ;  // Otherwise leave blank. The ID of single TAGs can be specified with 
 unsigned   long  TAGid3 ;  // the serial monitor (set 115200 baud) 

Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);  // Create instance with SPI protocol 

 void    setup() { // Start setup function 
  pinMode (AlarmPin,  OUTPUT );  // Define PIN as output 
   pinMode (OutputPin,  OUTPUT );  // Define PIN as output 
  Serial  .begin  (115200 );  // Open serial transmission with 115200 baud (ser monitor same baud setting!) 
  Serial  .println ( &quot;Hello!&quot; );  // Send text &quot;Hello!&quot; to serial monitor 
  nfc .begin ();  // Start communication with RFID reader 
  unsigned   long  versiondata = nfc.getFirmwareVersion();  // Read version number of firmware 
  if  (! versiondata) {  // If no response is received 
    Serial  .print ( &quot;Can&#039;t find board ! &quot;);  // Send text &quot;Can&#039;t find...&quot; to serial monitor 
    while  (1 );  // so long stop 
  }

  Serial  .print ( &quot;Found chip PN5&quot; );  Serial  .println ((versiondata &amp;gt;&amp;gt;  24 ) &amp;amp;  0xFF , HEX);  // Send text and version info to serial monitor
  Serial  .print ( &quot;Firmware ver. &quot; );  Serial . print ((versiondata &amp;gt;&amp;gt;  16 ) &amp;amp;  0xFF , DEC);  // Monitor when response comes from board 
  Serial  .print ( &#039;.&#039; );  Serial . println ((versiondata &amp;gt;&amp;gt;  8 ) &amp;amp;  0xFF , DEC);  //  

  nfc.SAMConfig();  // Configure board to read RFID tags 

  Serial  .println ( &quot;Waiting for an ISO14443A chip . ..&quot;);  // Send text that waiting to serial monitor 
}


 void   loop () {  // Start loop function 
  uint8_t success;  // Create variable 
  uint8_t uid[] = {  0 ,  0 , 0, 0,  0  };  // Buffer to store the UID 
  uint8_t uidLength;  // Length of the UID (4 or 7 bytes depending on ISO14443A card/chip type) 

  // Wait for an ISO14443A chip. If one is detected, the variable 
  // will be filled with the UID. Depending on the length (4 bytes (Mifare Classic) or 
  // 7 bytes (Mifare Ultralight) the card type is detected. 
 
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &amp;amp;uidLength);

  if  (success) {  // If detected, work off ....
    Serial  .println ( &quot;Found an ISO14443A card&quot; );
    Serial  .print ( &quot; UID Length: &quot; );  Serial . print (uidLength, DEC);  Serial . println ( &quot; bytes&quot; );
    Serial  .print ( &quot; UID Value: &quot; );
    nfc.PrintHex(uid, uidLength);  // print information to serial monitor 

    if  (uidLength ==  4 ) {  // If the card/chip has 4 byte length ....
                                                           // Mifare Classic card 
      cardid = uid [0 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // Set the 4 byte blocks 
      cardid |= uid [1 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // to a single block 
      cardid |= uid [2 ];  // 
      cardid &amp;lt;&amp;lt;=  8 ;  // together 
      cardid |= uid [3 ];  // 
      Serial  .print ( &quot;Appears to be a Mifare Classic #&quot; );  // 
      Serial  .println (cardid);  // Output the information 
      Serial  .println ( &quot;&quot; );  //  
      Serial  .println ( &quot;&quot; );  //  
    }
      if  ((cardid) == (TAGid1)||(cardid) == (TAGid2)||(cardid) == (TAGid3))  // Query whether the TAGs 1..2..3 with the respective 
 {digitalWrite (OutputPin ,HIGH );  // matches. Then switch depending on the 
 delay  (2000 );
 digitalWrite (OutputPin ,LOW );}  // on or off 
 else 
 {tone (AlarmPin,  1000 );  // And output a tone/frequency if necessary 
 delay  (4000 );
 noTone (AlarmPin);}
    }  // End of IF query/loop 
}  // End of loop  
 &amp;nbsp; 
                ]]>
            </content>

                            <updated>2022-05-10T11:30:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">WISENT Class Air Cushion Landing Craft</title>
            <id>https://funduinoshop.com/en/blog/projects/wisent-class-air-cushion-landing-craft</id>
            <link href="https://funduinoshop.com/en/blog/projects/wisent-class-air-cushion-landing-craft"/>
            <summary type="html">
                <![CDATA[
                
                                            On many model ship showcases, most of the ships are built down to the last detail and in very high quality. It&#039;s a pity that this is often overlooked by spectators. Spectacular and not everyday models...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                 Model making: WISENT class landing craft air cushion &quot;LCAC - Landing Craft Air Cushion&quot; 
 On many model ship shows most of the ships are built to the last&amp;nbsp;detail and in very high quality. It is a pity that this is often overlooked by&amp;nbsp;the spectators. Spectacular and not everyday&amp;nbsp;models are more likely to attract attention. Among them are without&amp;nbsp;doubt the hovercraft.&amp;nbsp;Why not build the largest of its kind as a model?&amp;nbsp;With a displacement of 550 tons, the Zubr class (Wisent class) is a giant.&amp;nbsp;A plastic model is available in 1:110. That was too small for me. 1:75 I just found&amp;nbsp;right. So build it yourself! 
 Build your own hovercraft: But how? 
 To read up on this subject, the book &quot;RC hovercrafts&quot; by&amp;nbsp;K.Jackson &amp;amp; M.Porter from the VTH publishing house was a valuable help. Which technical&amp;nbsp;components should make the model float had to be tried out&amp;nbsp;. Calculations were not very helpful here. At the end of the text a&amp;nbsp;list of the used battery and drive technology. A construction plan for&amp;nbsp;this type does not exist, so photos had to be used and a lot of&amp;nbsp;calculations were made. 
 The shell was built with a PU foam board and a power glue&amp;nbsp;from the hardware store. This went quite quickly. A 70 mm impeller, often used for styrofoam model airplanes, should make the Wisent&amp;nbsp;&quot;hover&quot;. The air skirt is made with rip nylon.&amp;nbsp;A material used in tent canvas and by skydivers&amp;nbsp;. 
 The power supply for the hovercraft landing craft 
 With the planned size of 900 x 400 mm, it was clear from the outset that it would not be an energy-saving model. An 18 V battery with 2.5 Ah from the&amp;nbsp;tool range - combined with a voltage converter - is to provide the desired voltage of an even 12 V.&amp;nbsp;A second voltage converter regulates the 12 V down to 9 V again&amp;nbsp;and thus supplies the propeller and the nautical lighting with an&amp;nbsp;even voltage.&amp;nbsp;Thus, the entire power supply comes from one battery.&amp;nbsp;Two of the outer propellers are designed for propulsion, the middle&amp;nbsp;motor was reversed and this propeller was put &quot;upside down&quot; on the  drive shaft. Reverse drives are thus possible without any problems.&amp;nbsp;The three drive nacelles were printed for me by the company - Ray Haller from Eibenstock - on&amp;nbsp;the 3D printer. They are controlled synchronously by a servo.&amp;nbsp;This drive concept has proven itself.&amp;nbsp;The 3.5 inch (approx. 9 cm) propellers come from the spare parts range for quadcopters.&amp;nbsp;Despite consistent lightweight construction, the model weighs in at 4.7 kg with all fittings&amp;nbsp;. This makes landing possible, but it is not suitable for trips&amp;nbsp;on land. Even the original is 99% of the time on the&amp;nbsp;water. 18 of this &quot;giant bison&quot; were built.&amp;nbsp;Ukraine, Korea, Russia, China and Greece used them. 
 Used components from Funduino: 
 1x&amp;nbsp; R4-E-0-1 :  EDF Turbine Impeller 70mm ADF70-28XL PLUS KV3900  1x R6-C-7-4:  Hobbywing SkyWalker 60A UBEC Brushless ESC&amp;nbsp;(40A controller gets too hot)  3x R5-E-4-3:  Ready ToSky 1306 KV3100 for 150 quadcopter  3x R6-E-1-4:  Hobbywing SkyWalker 12AE Brushless ESC  2x R12-B-8-2:  DC-DC Step Down Module 300W 20A 6-40V to 1.2-36V  
 1x Battery 2.5 Ah 18 V from Einhell (driving time approx. 15 min) The model is controlled with a Carson 6-channel remote control 2.4 GHz. 
                ]]>
            </content>

                            <updated>2022-05-04T15:30:00+02:00</updated>
                    </entry>

    
    
        <entry>
            <title type="text">How to install a CH340/CH341 driver?</title>
            <id>https://funduinoshop.com/en/blog/knowledge/how-to-install-a-ch340/ch341-driver</id>
            <link href="https://funduinoshop.com/en/blog/knowledge/how-to-install-a-ch340/ch341-driver"/>
            <summary type="html">
                <![CDATA[
                
                                            More and more often we are contacted by you and asked how to install the CH340 driver for Arduino compatible microcontrollers. So in this blog post we would like to explain you...
                                        ]]>
            </summary>
            <content type="html">
                <![CDATA[
                  How to install CH340/CH341 driver for Arduino compatible microcontrollers?  
 More and more often we are contacted by you and asked how to install CH340 driver for Arduino compatible microcontrollers. In this blog post we would like to explain    - What is the difference between microcontroller boards with CH340 chipset and &quot;originals&quot;  - Where to download CH340 driver  - How to install CH340 driver on Windows  - How to program Arduino compatible microcontrollers with CH340 driver inside Arduino IDE 
 After reading the blog post, you will be aware of all the stumbling blocks when starting up cheap Arduino clones! 
  The difference of microcontrollers with CH340 and the ATmega328P chipset  
 First things first: Arduino compatible microcontroller boards with CH340 chipset are slightly cheaper than classic boards with ATmega328p. This is partly due to the fact that the classic boards with &quot;original&quot; chipset can be connected to the home computer via USB immediately after purchase and are therefore ready for use.     Before we jump to conclusions at this point, let&#039;s take a detailed look at the most important advantages and disadvantages of CH340 boards: 
 Disadvantage 1: &amp;nbsp;The CH340 chipset is not compatible with all operating systems! 
 Especially with Windows systems, the CH340 chipset often leads to frustration: the Windows operating system is usually not equipped with the CH340 driver ex works. Arduino compatible boards with CH340/CH341 driver, which are connected to a Windows PC, are often not recognized as such by the PC. Within the Arduino IDE, error messages are therefore issued when uploading sketches. 
 Disadvantage 2: Uploading sketches to CH340 boards takes longer (tested at 5V)! 
 We admit: maybe this disadvantage is negligible in home prototyping, however it exists. The easiest way to see the difference is to look at the following data series. 
 
 
 
 
 Size of the sketch (byte) 
 
 
 R3 Upload time (seconds) 
 
 
 CH340 Upload time (seconds) 
 
 
 
 
 500 
 
 
 5.3 
 
 
 5.6 
 
 
 
 
 5000 
 
 
 9.3 
 
 
 9.7 
 
 
 
 
 7000 
 
 
 9.6 
 
 
 10.2 
 
 
 
 
 &amp;nbsp;  On average the program upload takes about 0.4 seconds longer with CH340 boards. 
 Advantage 1: The power consumption of the CH340/CH341 board is lower! 
 Of course you can neglect the upload time of sketches, especially for rapid prototyping. But what about the power consumption? Again, we looked at the board&#039;s behavior with two standard sketches that I&#039;m sure each of you knows: &quot;Bare Minimum&quot; and &quot;Blink&quot;. 
 
 
 
 
  Example sketch  
 
 
  Power consumption R3 (mA)  
 
 
  Power consumption CH340 (mA)  
 
 
 
 
 Bare Minimum 
 
 
 32.3 
 
 
 14 
 
 
 
 
 Blink 
 
 
 37.1 
 
 
 20.1 
 
 
 
 
 We are as surprised as you are! The power consumption of the CH340 microcontroller board is only half that of the R3... exciting! 
  So let&#039;s come to the conclusion:  
 For those who can live with the extra effort due to the installation of the additionally required driver, Arduino compatible microcontrollers with CH340/CH341 chipset are certainly a good alternative. The technical disadvantage of the CH340 version, the upload time, is certainly negligible for the hobbyist. Here even outweighs the gain by the low power consumption! 
 Where can you download the CH340 driver? 
 Now it gets a bit tricky: In the following we link you the CH340 drivers for the platforms Windows, OS and Linux. The links of the Windows and OS drivers link to a website with Chinese characters. Don&#039;t let that put you off: You can simply download the driver by clicking on the blue bar (cloud symbol). At the time of our test, the sketches were of course virus-free! 
 Windows:  http://www.wch.cn/download/CH341SER_ZIP.html  Linux:     &amp;nbsp;   https://github.com/juliagoda/CH341SER   OS: http:  //www.wch.cn/download/CH341SER_MAC_ZIP.html  
 Update 11/21/2022: We were informed by a customer that using the above driver for OS may cause complications. We therefore recommend the following driver (subject to a charge).&amp;nbsp;   https://www.mac-usb-serial.com/dashboard/   Further information can be found at&amp;nbsp; https://thingsmatic.com/2017/08/07/using-ch340-devices-with-osx/ &amp;nbsp;. 
 At this point we would like to point out that administrator rights may be required for the installation. 
 How do I install the CH340 driver now? 
 If you have downloaded the corresponding file, you can unpack it (for example with WinRar). Then open the Setup.exe file. After that a new window will open. In this window you select the file &quot;CH341SER.INF&quot; under &quot;Select INF&quot;. Afterwards you confirm the selection with the button &quot;Install&quot;. If the installation was successful, a popup appears, which confirms the installation. 
 And how can I use my compatible microcontroller board with CH340 driver now? 
 Quite simple: (almost) exactly like a board with ATmega328p or ATmega16U2 chipset. First you establish the USB connection between microcontroller and your computer. The microcontroller should be visible in the device manager. 
 Then open the Arduino IDE. Select the type of your microcontroller under &quot;Tools&quot; and &quot;Board&quot;. Then under &quot;Tools&quot; and &quot;Port&quot; select the so-called COM port of your controller. Usually this is the COM port with the highest number.     Important: In the next step you have to select the ATmega329p (old bootloader) under &quot;Tools&quot; and &quot;Processor&quot;. Only then you can load the CH340 controller!    That wasn&#039;t so hard, was it? If you want to start your next project right now, we recommend our free learning platform  www.funduino.de  with more than 250 free tutorials for the most popular sensors, actuators and much more! 
                ]]>
            </content>

                            <updated>2022-05-04T11:00:00+02:00</updated>
                    </entry>

    
</feed>
