First of all, I have KidStone and all of that, and then I have a list of all the tools it can use. Now I have my question, and then it generates this little XML snippet. My application will then parse the response, will figure out, oh, there's a search episode function, I need to call that. It will then return the output of that function as a new message in the conversation, and Kid can then use that to generate a response with all the context that it needs to actually do that.
Okay. So, that works. But I also wanted it to have a body. So, in the series, Kid is a Pontiac Firebird, and the Pontiac Firebirds, they start at around 20,000 francs. Believe it or not, that's not in my budget for side projects, and also, I am not a mechanic, so I had no idea how to deal with a real car. But I'm still a Kid at heart, so I was able to create this little Lego Kid. Now the question is, how can I communicate with my car through the browser? And that, I can do that using an API called the Bluetooth, and that's a browser API that allows me to communicate with Bluetooth low energy devices.
On the car, I basically have a little Arduino microcontroller board that is connected to this LED strip, to the wheels, and then I have two batteries, one for the wheels and one for the microcontroller board. And on the board, I then have a very small C++ script that exposes one BLE server with one BLE service with one BLE characteristic, and that characteristic has two bytes. And one byte controls the speed of the wheels on the left side, and one byte controls the speed of the wheels on the right hand side. In my application, I can then connect to the device, connect to the characteristic, change the value of those bytes, which then changes the speed of the car.
Comments