I am trying to communicate with the Bittle robot using visual studio code and java but can't seem to grasp how to do so. can anybody help me?
My bittle sucks and doesn't work
This doc explains how to control the serial using Python. After using the Java com port example suggested by Timothy, you should be able to write a similar script.
Go to YouTube and search for "jave com port programming"
Find one that you like. I thought this one: Java Control of Arduino - YouTube was a good start.
You must also read the Petoi Serial Protocol documentation.