These is a cool project by one of my fellow Chinese Delphi programmers called nickemma (see original links at the end of the post) I came across today that I couldn't resist to share with the world:

These is a cool project by one of my fellow Chinese Delphi programmers called nickemma (see original links at the end of the post) I came across today that I couldn't resist to share with the world:

Picture 1
===
The electronic car that receives control commands through WIFI, sent from an Android app developed in Delphi.

Picture 2
===
The FireMonkey app that sends hex. control commands to the toy car.BTW, it uses an UI framework called OrangeUI that's available in China only.

Picture 3
===
The settings window of the Android app where you specify the IP of the toy car's WIFI modue, the hex. commands for turning left/right, forward and back, and so on.

Picture 4/5
===
He made two toy cars each of which are differently constructed, but seems to be controlled by the same Delphi-powered Android app. I don't know much about the electronic thing, but this project obviously shows a cool part of Delphi :)

link1: http://bbs.2ccc.com/topic.asp?topicid=552684

link2: http://bbs.2ccc.com/topic.asp?topicid=552839




Comments

  1. Amazing, I always wanted to do stuffs just like this one. Edwin Yip do you think that a developer must have a deep knowledge about electronic in order to do such projects ?

    ReplyDelete
  2. Mahdi Safsafi I don't think so, the author provided some brief info, I'll translated them for you in a few days. On the coding side, the author writes only the FMX client program which sends commands via http to the server (which is the car).

    ReplyDelete
  3. I have wrote a app by firemonkey that can remote control drone by sending remote single through wifi and show video from drone through wifi. remote control is by touch on the virtual remote sticker on the screen. the virtual remote sticker is a Firemonkey control.

    ReplyDelete
  4. Jack Lee I wish you can share some instructional info here, I promised Mahdi for translate some info from the original post, but I found that's not an easy task since I'm not the original author nor I have enough mechanic/electronic knowledge :D

    ReplyDelete
  5. Thanks Edwin Yip . I really appreciate your help :). Jack Lee that would help a lot if you can share some info with us.

    ReplyDelete
  6. Mahdi Safsafi Well, I regret I said "I don't think so" before thinking it in details :P I myself almost have zero electronic knowledge, so I try to translate the simple instruction posted by the original author:

    1 - You buy a toy car chassis, something like this (https://item.taobao.com/item.htm?spm=a230r.1.14.20.43314643aRcRmE&id=20088336267&ns=1&abbucket=11#detail), which has 4 motors and 4 wheels. The OP made it himself but you don't have to do this part, just buy an integrated chassis, as he suggested.

    2 - You need a L298N motor driver to drive the motors on the chassis.

    3 - You need a NodeMCU which is an IoT platform (https://en.wikipedia.org/wiki/NodeMCU) to connect to the L298N motor driver.

    4 - And you write a TCP server program in lua to run inside the NodeMCU, the TCP server program will receive commands from your Delphi Android app (through WIFI), and then translate the commands to signals recognizable by the L298N motor driver, which then drives the motors which in turn drive the wheels, bingo! The car moves!

    This is the big picture as I understand it, but you need to connect them all together, and think you can resort to the manual and Google.

    The OP also mentioned you'll also need the following:
    - A DC to DC power convert to convert 12V to 3.3v (I don't know which modules).
    - Some DuPont cables.
    - A multimeter (https://en.wikipedia.org/wiki/Multimeter)
    - A soldering iron (https://en.wikipedia.org/wiki/Soldering_iron)
    - And solders (https://en.wikipedia.org/wiki/Solder)
    - USB to TTL converter.

    That's all, hope it helps.

    My comment: You might consider (ultibo.org + Raspberry Pi) instead of NodeMCU, so that you can write the above mentioned TCP server with Pascal instead of lua. I guess it's workable.

    PS, I appreciate your detours library, that's why I have spent hours trying to understand the original post and translate it for you :D
    item.taobao.com - 智能小车底盘 4驱动/动力实足 带码盘/测速 ZK-4WD 255*155-淘宝网

    ReplyDelete
  7. Further development:
    - Get a TPLink 703N mini router and install the OpenWrt operating system, then you can add cameras, infra-red sensors, ultrasonic sensors for detecting distances, and so on.

    ReplyDelete
  8. Edwin Yip Thanks man. its a good starting point for me.

    ReplyDelete
  9. Basically all remote toy is controlled by PID signal through duty ratio signal from remote controller. We can simulate it by send it like 100110110100110. Each type of remote controller has its own data format, you must get it from remote control factory.

    And then we need a WIFI board that can receive WIFI signal from moble and transfer our data out to serial port(UART) to drone's flying controller.

    And then we can write APP by firemonkey, by using TIdTCP to send our remote control data to the WiFi board. And we will add two TCircle on to APP form to simulate remote stick.

    So there are two key point:
    1. you must know the PID data format of you remote toy.
    2. you must have a WIFI board that has a UART port and can transfer data from WIFI to UART, this function we call it "transparent transmission", it means that this WIFI board can transfer data from WIFI(as a TCP server) to UART and not change the data.

    ReplyDelete
  10. I searched on Amazon, WiFi-UART module like this: amazon.com - Robot Check

    ReplyDelete

Post a Comment