Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Random Nerd Tutorial
Author | Message | ||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
A bit spendy (£30) but worth it The standard ESP32 could be the ideal companion for the PicoMite (for my particular needs). Bluetooth (SPP), WiFi and especially ESP-NOW. So what the heck; I installed the Arduino-IDE for like the sixth time and this tutorial had me up and running in minutes. Let's see how it goes |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
The Arduino IDE makes me want to give up life. It's horrid. While you're at it, stop pretending that C++ is a good language for beginners. It isn't. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
unfortunately the link refers to a site that cannot be read without a paid registration Edited 2024-10-14 18:42 by Martin H. 'no comment |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
Hmm, that's odd. Here is the link to the actual shop |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
No, no, no. This is desperation...I really want that ESP-NOW. I feel kinda dirty but... The hand-holding of the book means I have instant results which spurs me on. This time next week, I'll probably have thrown-in the towel |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
@Mixtel90 For giggles, I have been throwing snippets of Basic code into ChatGPT and requested a C conversion. The results look convincing but have yet to test. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
One of my friends asked ChatGPT to write a short program in MSX BASIC. It came back with something that couldn't possibly run on any MSX machine. Live dangerously! :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
I'm talking snippets. I give: for i = 1 to 1000 next And I get: for (int i = 1; i <= 1000; i++) { // Your code here } Baby steps...saves having to look-up every darned thing Heck...gonna grab my soldering kit...I think I have made a BT (SPP) device out of this thing |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
I use the Arduino's where I need to and its not bad. Well you still need a ton of lib's but then you also do in Python too. A few projects still needs to be in asm but only if I don't get to pick the parts used. After my fall in March I couldn't use my xbox controller which for years have replaced a mouse. Now I have a 8 button keypad thing using the badusb board. a switch enables, button #1 "t/sell hand", #2 a mix of mouse and keyboard" #3 "w", #4 "s", #5 "a" #6 "d". #7 & 8 enable a 20 min of 2 random text used for when I am AFK'd or "ASAK" LOL. This one if for Minecraft. I have 4 of these for other programs. Quazee137 Use the tools you need to best get the task at hand done. |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
The one positive thing I can say about Arduino is that ChatGPT seems to know everything. It's like having a matherp sitting next to you but you don't have to worry about asking dumb questions Edited 2024-10-14 22:49 by PhenixRising |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
It's probably running on an Arduino network... ;) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
First time Phone to ESP32 to PicoMite I am such an awesome c-programmer |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
Oh wait...this is too much FUN! I wanted to do an OnTimer (settick) equivalent. I don't subscribe to ChatGPT and so I exceeded my daily limit. Decided to try Copilot for the first time which when asked, informed me that there was no limits for coding help. So, it started-off with some crappy external library...all kinds of errors and so it said let's stick with the built-in functions. It kept getting the function names slightly wrong and so I would change them. It really was like working with an extremely patient human and the more I assisted, I swear, it got excited Well we got there and I'm kinda happy that we had to jump through a few hoops because it was just FUN hw_timer_t * timer = NULL; void IRAM_ATTR onTimer() { Serial.println("Timer Interrupt Triggered"); } void setup() { Serial.begin(115200); // Initialize timer with frequency of 1 Hz (1000000 microseconds) timer = timerBegin(1000000); timerAttachInterrupt(timer, &onTimer); // If timerWrite works without issues, let's use it timerWrite(timer, 0); timerAlarm(timer, 1000000, true, 0); } void loop() { // Your main code here } Compiling is a bit of a drag but this is a great way to create high-speed add-ons for the Mites Edited 2024-10-15 04:06 by PhenixRising |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
Well I guess "jumping through hoops" mystery solved. My install is fresh and so I'd downloaded the latest (firmware? API?) ESP32 Arduino release. Quite a few things are no-longer compatible. just found this: Those last 3 timer-related functions were giving me fits Anyway, I ditched the version 3+ and installed the last of the Version 2 and now I can grab all kinds of ESP32 code and it runs without a fuss. |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 858 |
And now I know why....It's optimizing and doing an amazing job I wanted to check execution time and so I did something similar to our "Benchmarks" program; lots of repeats of the same floating point multiplication...I mean hundreds of thousands....Zero microseconds??? No way because this classic ESP32 has no float hardware. I casually commented to Copilot that the compiler had figured that my code was just repetitive cr@p: Copilot "Oh right, let's take care of that" and spits out a routine that constantly changes and I got some realistic microseconds. This thing is insanely quick if I stick with 64-bit integers. Can't believe I actually typed "hang-on, I'll be right back" to Copilot Edited 2024-10-17 16:49 by PhenixRising |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
I have "Fitten" Code Chat extension embedded into my VSCODE editor. It's a very helpful coding friend. Its even helped me write "working" MC6809 CPU Assembler code. AI, when used with coding, is kinda neat. ( Well, you DO have to really check everything yourself, but you can *almost* trust it...) |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
I don't even trust myself when coding--that's why I add not many lines at a time, then test. Often, I've been wrong. Not much different, I would think, if it's AI building the initial code to test (but it's best if you understand what it is doing). PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
can these AI mentioned convert great cow basic to mmbasic? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6786 |
Probably not unless there are examples of working conversion somewhere on the internet. It's not straightforward anyway. Which PIC or AVR was the GCBASIC written for? Which MMBasic platform are you converting to? You need a pretty deep knowledge of both languages. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Print this page |