Before I would like to start, I would like to speak openly here for the intelligent Dr. Wurst, my professor, to ask him something really quick.
Would this blog post count as acceptable for a lab notebook entry? It would be a pleasure and a great convenience if you will accept this!
I will answer all of your questions in the following paragraphs and write about me, Urooj, and Braxtons time working on Lab 3 for Robotics.
Let us begin.
Today, I am working on finishing up our multi-process c program that will have the robot adjust its direction and speed at the same time, thus two processes working in a multi-process system can be observed.
If we had approximately four or so hours straight to spend on this lab, we would have completed it all in one day in my opinion.
But that is fine, now I am back and now I am more than ready to solve some problems!
There begs a question: What will I do first? Well, right here and right now is a start. Keeping steady lab notes and tracking everything I do will be most beneficial for us all in the long run, as we all can learn easily about anything — we must simply have a passion for whatever it may be!
I apologize. I am writing much like a Philosopher. One could say I am a philosopher of technology. With this out of the way however, I would like to actually get down to business. I will now begin [:chuckling:]
I am going to produce a program to read the Sonar Sensor attached to the 0th analog position in the Botball device. After I do this I will begin to track the sensor readings for the following materials and light levels.
If my hypothesis is correct then light levels will not affect the Sonar sensor, as it uses echolocation to sense its surroundings. What a smart device truly!
However if I were to attach light sensors and IR sensors, I could create even more functionality to the robot. Heck, imagine if I put a camera on the front of the robot to stream to my phone! And a bluetooth keyboard to have the user gain full control of the robot itself.
Goodness, technology endlessly brings me so much interesting new stuff to work with! Okay, I am going to stop writing here now so that I can accomplish the programming for the Botball.
Attempt Number 1: Robot keeps moving forward, stops to check IR readings (sensing left value vs right value.) but fails to adjust course in second function. Layout of functions: First function is the IR reading function, then comes the DRIVE function. The IR reading (and, well, writing as well) function keeps track of the devices input readings and adjusts variables so that the drive function performs as we want it to — to avoid obstacles or turn around if there is no way forward.
Changed motorValue from changing using is equals ( == sign) with = sign. Maybe program will work now. Attempt number 2 will be detailed in the paragraph/s below.
Attempt Number 2:
Attempt 2 was a success!! The robot followed the instructions perfectly this time after setting each analog state (0 and 1 as floating points) and used multiple functions in rapid succession. Time to implement C multi-process capabilities and if this works the robot is all set. Its behavior is to like stimuli and approach it (when it senses more from one IR to the other, it goes towards the stimuli closest.)
Attempt Number 3:
Pre-program test: Using multi-process function in KIPR C programming environment means I might not be able to use the defer method. Initially I would have used this in between processes to defer the need of one process to the need of the other process. Let us try to see how it works.
Robot functionality lost while using start_process and kill_process. Maybe I should use kill_process in while loop? Next attempt will be below.
Attempt Number 4:
Put the start processes and kill processes before and after with while loop. Did not work. Now attempting to change kill_process(0 and 1) to kill_process(1 and 2). Maybe this will finally work?
Attempt Number 5:
Everything is balls [:tears forever:]