This BLE smart car is completed based on our latest design bluetooth 4.0 chiped- BLEDuino, L298 Motor shield, smart car body. The smart car production is simple, as DIY enthusiasts can complete their own smart car only in the form of building blocks, and the operation is also very simple, just controlling it via bluetooth 4.0 remote control, or mobile phone APP. Here we mainly explain the operation of smart car. With the help of the simple communication protocol, the car can achieve human-computer interaction, so DIY enthusiasts can build smart cars of their own on the basis of adding various sensors, camera modules.
Operating process 1. Plug the L298 Motor Shield into the BLEDuino 2. Access the smart car motor into the L298 3. Fix the 12V lithium battery onto the smart car body via the cable tie 4. The assembled remote control and BLE smart car 5. Remote control operating instructions
When the small car and the remote control access to electricity, the remote control will automatically connect the car. Push the remote control throttle to a certain position, and then push to the direction you need, the smart car would be driven to the direction. If you want the car stop, just pull the throttle to the lowest location. The Demo only briefly illustrates controlling the car by remote control, if the users want to control the car through the APP, the using method is the same.
We could often feel frustrated when programming using the Arduino IDE. Why? Not because of how many errors we encounter in the program, but it is so difficult to find out the errors in source code, which is really something freaking out. For example Arduino IDE does not seem to display the number of rows, the prompt window can show us in which line the error occurs, but we just have no ideas where the line it is. If you can double click to find exact position of that line, then we will not care about which line it is: line 1 or line 10. But that just hasn’t happened. What’s worse, it cannot change the display font, which reads clumsy or neither too small or unclear enough, as a consequence, seriously affecting the efficiency of our programming. So I wanted to transfer to another editor and the new editor had better be able to take the place of the Arduino IDE completely. Then I found the Sublime Text 2. Here take a look at the overall interface of it.
Note: The language of the Arduino depends on your operating system language. But you can certainly set your own language.
1. Install 1.1 Download the tools.
Sublime Text 2
ST2-Arduino 1.2 Install Sublime Text 2 editor; 1.3 Unzip “ST2-Arduino-master.zip” to the installation directory “~Sublime Text 2Pristine Packages” ; 1.4 Run Sublime Text 2; 1.5 Press ctrl +` to bring up the bottom command window;
1.6 Paste the following code and press Enter:
import urllib2,os;pf=’Package Control.sublime-package’;ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),’wb’).write(urllib2.urlopen(‘http://sublime.wbond.net/’+pf.replace(‘ ‘,’%20′)).read())
1.7 Restart Sublime Text 2. If it has “package control” in Perferences->package settings, the installation is successfully.
1.8 Press Ctrl+Shift+P, input install and select Install Package and press Enter.
Previously we introduced “Arduino Simple Wav Player”, which actually should not be given the name “wav player” because it’s not flexible at all for the limitation from Arduino flash. This tutorial and set of kits, is complementary to that. By contrast, it gets greatly improved in the flexibility and sorts out the limitation problem by storing the converted music file into a SD card. Makers can build better music player on this basis.
1. Dupont line 2. SD module 3. USB mini speaker 4. Freaduino UNO 5. SD card 6. Audio port
1. SD module and UNO connecting chart:
2. Solder the audio port. Do pay attention to put a 10 uF capacitor in serious between the left/right channel and the audio input, in this way, we can reduce the impact of the DC component to guarantee a better sound quality. Then plug the channel signal lines into the D9 pin on UNO.
3. Make audio files: convert the audio files to be played into wav format by using the audio format conversion software.
4. We need the software (see in the enclosure) to make the appropriate audio format for Arduino. Open the software; select the suitable conversion program according to the working frequency of the Arduino. Here we select the full-rate single channel mode “Arduino with 16 MHz”. Drag the wav file just now to this batch processing file; wait for a while you will find a new folder, in which locates the converted file. Put the generated file into the SD card formatted as FAT format.
5. Add the “SimpleSDAudio” library files to the folder “libraries”.
6. Open the “MostFuntionDemo.ino” in “SimpleSDAudio”.
After the download is completed, open the serial port debugger, you will see the following window.
Then, click “send” after you input the file name. Prompts should appear below the text as:
As it indicates, press “p” for play and you can enjoy beautiful melodies from the USB speaker.
We may often encounter such situation as bootloader falls off when using Arduino, this thing can freak us out especially when we got no bootloader tools on hand. So what shall we do? Here we’ll introduce a way on how to burn bootloader via Arduino, which is rather practical in cases when without bootloader burning tools and no extra Arduinos.
Talking about using Arduino to play music, is it the Arduino MP3 shield not the first thing you come up with? Or maybe some geeks will consider about tone() function? They are not the things our topic is about today. We don’t need any MP3 shield, tone(), or SD card. Only Arduino can perfectly play the music you like.
It’s cool. Do-it-yourself a home-brew MP3 player for dear daddy or little daughter is fascinating. If you got a small Freaduino Nano or Freaduino Pro to put this into fact, then I’m sure ipod won’t be your consideration.
But specifically how do you make it? Let us take a look.
PS: For the demo we’re gonna show you, since the RAM for the Arduino is very small, hence we can only keep a 2-3 second music. Use a SD card, there’ll be no time limitation.
Integrated with the homemade low-pass filter, this Arduino-based simple WAV player is to send out PWM signal generated by UNO, then through the low-pass filter and make the PCM data stored in the flash of UNO into sounds. Basically, the player cannot be regarded as a pure WAV playback, because by extracting the data from the WAV file and storing it in an array format in UNO, this tutorial is for reference. You can make SD card based WAV player by referring to this idea.
The WAV player is easy to make on different platforms and applicable for various scenarios like voice broadcast system, electronic keyboard, as long as you understand the principle of sound.
Built on the basis of Arduino UNO, GPS, SD card, TFT, GPS map navigation system is to obtain the real-time position information via GPS, to send it to UNO for calculation, according to the calculating results, and teamed up with the map file stored in SD card, thus presenting the position on TFT. The GPS system, owing the function to store the current position information, can be applied to running positioning and to record the running tracing.
* Dupont Line * Freaduino UNO * TFT1.8 shield * SD card * SD module * GPS bee * Digital push button x 2
3. Make (1) Connect TFT1.8 shield to UNO according the table below.
(2) Connect SD module to UNO according to the table below.
(3) Obtain the map file. * Release the file“maptile.exe”. * Choose the right era on map. * Left click to select the map area needed to download; double click the left mouse button to finish. * Left click the button to finish downloading. * Copy the map file into the folder “SMARTGPS”within the SD card.
(4) Insert the SD card into the card slot of SD module. (5) Connect GPS Bee to UNO according to the table below.
As typical input device, keyboards have special advantages when used for interactions. To give a case for example, passing push-key events to flash via keyboard spares the entire process of going through cumbersome interfaces. Although it’s easily for us to come up with the idea of disassembling the keyboard to lead out the keys. But this method has the disadvantage that the key value cannot be changed dynamically. But if only we use a simulation computer keyboard, we can set the push-key time and key value freely. This tutorial, shows how to press a key to trigger an input “HELLO WORLD” into your computer screen via the simulation computer keyboard.
(1) Follow the below circuit diagram to solder the resistor, USB cable and Dupont line onto the universal board
Note: please refer to the table to find out what each color stands for.
COLOR STAND FOR
After welding, the circuit should be like this:
(2) Connect the Dupont line welded as the upper picture displays to UNO by referring to the table.
UNIVERSAL BOARD UNO
NOTE: the wiring method in the second step is not fixed. If readers need to use other pins, it can be achieved by modifying the wiring definition of the USB pin in usbconfig.h in UsbKeyboard library.
(3) connect the number key to D1 pin on UNO
(4) Download the USBKEY code to UNO. You need to note that for a successful compilation of USBKEY, it’s necessary to put UsbKeyboard files into the folder “Arduino IDE libraries” in advance.
(5) After downloading the code, unplug the UNO code to download USB, plug in this simulation USB keyboard and then open a text on the PC end. Press the number keys on the UNO, the word “HELLO WORLD” will appear in the text, as shown below:
So far, the building of Arduino simulaltion keyboards comes to the end. Readers can extend more complex, more interesting USB tools for interaction with PS from gaining a little bit inspiration from this simple enough USBkey.
The principle of shake LED stick is based on that people have persistence of visual senses. When you light up a column LED at different moments in different ways, shake it, and a very beautiful picture will display before your eyes. It not only can display pictures but also can display characters, both static and dynamic. The pictures will be very nice. We can equip this kind of LED on our bicycles and fans, and other things. It’s good choice for DIY.
Freaduino Micro MB_MIRCO Vibrating Sensor LED Perforated Circuit Board
2.1 Cut perforated circuit board into halves 2.2 Connect the two pieces of boards 2.3 Solder LED, vibrating sensor 2.4 Program analysis 2.4.1 You must get data of the characters that you want to display, and data mode is column by column, for example “12”: Column by column data mode is: first, get the first column data, then get the second data, and by this analogy. The LEDs have a common anode, so I need to invert the data. You can get the character data from the below URL, as displayed in the above picture:
2.4.2 Data Update When you are shaking LED stick, vibrating switch will switch on and off and MCU can catch this variation level. We can enter interruption function and update data. So why do we need this vibrating switch? Because we can’t update at any time, we need a reference point to make sure that the position of picture will not change. First, we set the first column data, and delay, then set the second column data, and delay, by this analogy, you will see a picture if the delay time is too short.
It is so weary to use our hands, why not use a motor? Now, let’s see my improvement, and you need:
3.1 Make motor paste on perforated circuit board. 3.2 Use infrared sensor instead of vibrating sensor, and infrared sensor’s position must be situated suitably. My method is: equip infrared sensor near rotating shaft, because when infrared sensor detect motor it will output a signal, vice versa, then MCU can update data. 3.3 Due to the circuit board rotates as the motor runs, we need to install MCU and the battery on rotary stick, and make it balance. This is to use infrared sensor to get a reference, and update data column by column. You can use your imagination, and display more beautiful pictures, next is my rotary clock, expect your share.
I have some other ideas: I want to display an expression or a small key, or an animal. It will be amazing if the animal can move and run. Do you have better idea?