Chapter 204: Robots

readx;

"You know the concoction technique, right?" Mark asked Lin Hong. Pen × fun × Pavilion www. biquge。 info

Lin Hong nodded.

Modulation technology is the technology that converts a baseband signal into a transmitted signal. It samples and quantizes the analog signal, and then modulates the optical carrier with a binary digital signal "1" or "0", and impulses the encoding.

Lin Hong had been exposed to this aspect when he was studying radio in the past, and recently studied infrared wireless transmission, and he had a very deep understanding of this area.

"Radio control uses pulse modulation technology. A remote control system consists of a transmitting part and a receiving part. ”

Mark picked up the remote control in his hand, pointed to a chip in the lower left corner and said: "This piece is the crystal of the transmitter, which is responsible for modulating the received control signal into a high-frequency signal and transmitting it." There is a high-frequency oscillation circuit here, and when we hit the direction above, the pins of the integrated circuit inside will be turned on, and the circuit will be closed, and a fixed sequence of electrical impulses will be generated. ”

With that, Mark took out a toy car from another box, and after turning on the power, he pressed the direction lever in the remote control. The car immediately rushed forward.

"When I operate the joystick, the pulse train is different. For example, the forward signal will be followed by a fixed sequence of synchronization in front of it, and then it will be followed by 16 pulses, so that the receiver will know that this is the forward signal after receiving it. If it is followed by 40 pulses, then it is a backward signal......"

"Do you understand me when I say that?" At the end, Mark stopped and asked Lin Hong.

"Well, I basically understand. I have previously studied infrared wireless transmission. The principle is pretty much the same. Comparatively speaking, this type of modulation and demodulation is much simpler. I think there should be a filter in the receiver to filter out all the radios that are not in the corresponding frequency band to avoid interference. After all, there are many other radio signals in the air. ”

"You're right!" When Mark saw that Lin Hong was able to draw inferences, his eyes lit up, "Have you studied infrared wireless transmission?" ”

"Mark. Stone is a professional level in the field of infrared wireless transmission, a master of masters! Arthur came over at this time, he happened to hear his uncle's last words, and immediately interjected, "He invented a set of infrared wireless transmission protocols, the efficiency is much faster than those of commercial companies, if it is not supported by the current hardware, it can theoretically reach 4mbit per second ......."

Arthur then gave a detailed account of the SAM Society's deeds at the school, and then looked at Mark with a smug face.

That's why he's like this. It's because his uncle usually shows off in front of him, and he always thinks of himself as a technical master, but Arthur's field of expertise is not comparable to computer networks at all. And Mark said that he didn't understand either.

And now, he finally has a project worth bragging about, and naturally he won't miss a good opportunity to show off in front of Mark.

"Really?" Mark was overjoyed when he heard this.

"Of course it's true!" Arthur complained, "Do you suspect that I am lying to you? Our association is now well-known throughout the country! ”

"No, it's not." Mark quickly shook his head, "I mean." Is Stone really that good at this? How can you invent your own protocol? ”

"Of course." Arthur didn't expect him to ask this question, and was a little stunned, "His agreement has even been praised by Wozniak, the founder of Apple, and now it has been patented." ”

"Great!" Mark immediately walked quickly to Lin Hong's side and grabbed his hand, "Stone, I didn't expect you to be so accomplished in this area. I just happened to have some problems here, can you help? ”

"Uh......"

Lin Hong hurriedly withdrew his hand, he couldn't bear his enthusiasm.

"How can I help?"

"Do you see any of these toy cars?" Mark immediately explains, "They are connected through infrared sensors, and I asked a friend to write a little messaging program for me so that they can communicate with each other, but it seems to be a bit of a problem, not only because of the delay, but sometimes it misses some important information." ”

Mark's words made both Lin Hong and Arthur feel a little surprised.

They looked at the seven or eight toy cars on the ground, but they didn't expect that they were still controlled by infrared wireless.

"Mark, when did you start playing this kind of advanced stuff? Aren't all the things you do purely mechanical? Arthur asked first.

Indeed, in the past, the machines built by Mark were purely industrial-age products, using gears or chains as transmission power, showing an alternative heavy metal aesthetic.

But today, Mark surprised him by telling him that he was using infrared sensors to connect several toy cars.

"What is this for?" Lin Hong was also a little curious.

He had been concerned about the remote control just now, and he didn't pay attention to the toy cars on the ground, and now he found that these toy cars actually have a circuit board connected to an infrared receiver and transmitter.

"Hehe, you'll find out later." Mark smiled and didn't answer, but said, "Stone, while it's still too late, can you try it and help me see what the hell is going on?" ”

"I'll try." Lin Hong agreed.

He was actually curious as to what Mark wanted to do with the cars.

He and Arthur both entered Mark's bedroom and found that it was even more messy, with all kinds of electronic components everywhere, and even a welding machine inside, and of course, what interested Lin Hong and Arthur the most was that there was a brand new notebook on the table.

"Wow!" Arthur immediately rushed over and looked at his new notebook.

"Oh my God, it's the latest T3200SXC!"

Although the configuration of this laptop is nowhere near that of his desktop, this is the latest product after all, and its advantage lies in its portability, which can be carried out at any time.

Mark said that he didn't usually use the laptop at all, but that his friend came over to help him debug the program.

Under his instructions, Arthur quickly found the core code of the control system used in the toy car.

Lin Hong also took a look on the sidelines, and indeed found a lot of problems, mainly because the recognition of the signal is too rough, so many toy cars, and the use of infrared for data transmission at the same time, there will naturally be problems.

"What is this trying to achieve?" Arthur casually asked, "I look at the code, it's very simple." ”

"It's relatively simple. My purpose is to ask them to complete only the most basic movements, only one command. That is, if the car in front of it encounters an obstacle, the car behind it will turn and walk for a while, and then adjust its attitude to move forward......"

Mark explained in detail what he wanted to do with the cars.

It turned out that he had just placed those things in the field to act as an obstacle, and he was going to use these cars to traverse this complex terrain and make one of these cars reach its destination correctly.

"There's something wrong with your algorithm." Arthur said mercilessly, "In this way, the end result will be that all the cars will be messed up, and some of the cars may go straight back." ”

"I know, but don't worry about it, just make it as I want it to be." Mark had expected this for a long time.

Although Arthur may be able to handle it, he is not as familiar with the infrared protocol as Lin Hong at all, and he has to check the information temporarily and figure out the mechanism before it can be repaired in a targeted manner.

But time didn't allow it, Mark kept urging beside him, just stood up and gave up his seat to Lin Hong.

Lin Hong looked at it carefully for a while and summed up two points. The reason why the data is delayed is because of the problem of the data protocol used before, and the frequent packet loss is due to the decoding time, and the filter algorithm is not written well.

Due to the time constraints, he didn't have time to change the protocol, so he just needed to fix the packet loss bug for him, and then immediately burned it into the ROM on the cart board through the burner.

Mark briefly tested it and found that it was indeed much better than before, and was immediately overjoyed.

"Hahaha, Orlando, you can't win this time!" Mark laughed heartily.

"My dad is coming over too?" Arthur only learned the news at this time.

As soon as he finished speaking, he saw a truck drive into the warehouse, and when it was parked, his father jumped out of it.

"Orlando, you're finally here!" Mark immediately greeted him, "This time I will convince the loser!" ”

"Really? Don't get too happy, Mark. I forgot to tell you that our lab has just made a very good breakthrough. ”

"Oh? Is it? Mark didn't care, "You said the same thing last time, what was the result?" Hahaha! ”

"Okay, you two, and I'm not afraid of the two kids looking at your jokes." Vena stepped forward at this time and said, "Who will win, hurry up and compete, and then go to the show!" ”

"Vena is right, hurry up and unload the robot."

Orlando didn't say anything more, but the people who came with him opened the trunk door of the truck and lifted out a very sci-fi-looking robot from inside.

When Lin Hong and Arthur saw it, they were immediately interested, because the appearance of this robot really looked too much like a robot in a science fiction movie.

Except for the feet, which are tracked, the others are designed according to the structure of the person, and the body, arms, head, and facial features are lifelike.

Lin Hong noticed that the robot's two arms were stretched forward, holding a laptop computer on it.

"That's cool!" Arthur amazed as he spun around the robot, "Dad, is this the latest robot from the MIT Mobile Robotics Lab?" (To be continued)