Here are some screenshots of serial transfer python program, as well as my code highlighting style for TGRK in notepad++. Stayed up a little too late last night working on this.
Discovered there are some issues with transferring more than 30+ byte program. I have yet to check if it's just the Attiny85 not sending everything back, or if it's not receiving it all. Under 30 bytes, it seems to work every time.
To transfer, I plug in serial adapter to Devices PB0 and PB1
PB0/MOSI = TX
PB1/MISO = RX
- Go to run menu on device:
- MENU 0 > Selection 2
- Then start python script.
- Then press run button on device, and transfer runs.
The python transfer script has a dict with all keywords, and reads a file in same directory called "prog.grk". This makes writing a program for device as easy as connecting to PC through serial adapter, editing program file, and running python script.
When it reads through the file, it skips any whitespace and adds the corresponding integer to a list, which then gets converted to a byte array to be sent to Attiny85. This allows us to write TGRK code using spaces, tabs, etc. At least one whitespace between each keyword or integer is necessary, but as many one wants to use is permissible. The EOP keyword is required at end of program when programming this way. Here is an example:
This code just reads the floating PB2 ADC pin and lights led 1 or led 0 depending on it's value.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.