Tags

    3/22/2021

    Comments

    3/22/2021 15:24:09 HST Gregorian Calendar
    Today I tried to get the serial working on the arduinos at the elab. I plugged it in and had to fish out the device name from /dev/ but for some reason no matter what the computer wasn't getting what the arduino sent. It would get some random bytes but they weren't what was supposed to be sent. I thought it might be bad connection because the bytes looked like some was missing and plugged it into a different USB port on the computer but then I forgot the device name changes and spent a while until I realised I had to re-find the name in /dev/. I didn't actually get the serial port working today.

    3/24/2021 15:03:47 HST Gregorian Calendar
    I got my previous arduino code and it turns out it is just the baud rate being set to 921600 instead of 115200 because when I switched over to C++ the weird library didn't have a setting for 921600, only up to 115200 (maybe it was written in like 1980?) but after that it started working. The arduino at home for some reason tooke like about a second before serial port would work and stuff could be received on the arduno, but at school for some reason it doesn't do that and works immediately. I still don't know if it is the Arduno or the computer because I am using a different one for both. Then I realised I couldn't really work on the PID because I didn't actually have the motor, h bridge, and power supply so can't collect data into PID, but at least I know the weird 1 second bug that isn't actually that big of a deal is localised to Macs and 168P arduinos only (basically not 328P ardunos)

    So basically this week I failed to get a serial port to work then got it to work but then didn't actually do any PID because I have no motor. I could technically do pwm because online it says 328P has the right timer registers and pins set up.