Shop OBEX P1 Docs P2 Docs Learn Events
New here — just trying to understand how people are using AI alongside embedded projects — Parallax Forums

New here — just trying to understand how people are using AI alongside embedded projects

Hi everyone,

I’m new to this forum and also very new when it comes to AI-related tools. I don’t really have any concrete idea or project in mind yet.

I’ve been browsing some of the discussions here and noticed people experimenting with AI alongside microcontrollers and embedded development, which is interesting but also a bit overwhelming from the outside.

I’m mostly curious at this stage — for those who started without a clear plan, how did you figure out where AI actually made sense to use (or not use) in your projects?

Just looking to learn from experiences, not asking for technical guidance yet.

Comments

  • I started trying Workik for code generation. It's pretty good with general algorithms and doesn't choke on Spin, Spin2, PASM, PASM2.
    It takes some work to get it to reject depreciated SPIN2 stuff, but then both the language and docs are still in flux.
    It has taught me more than a few language features, some I totally missed and can't find in the docs!
    It still doesn't really understand the difference between smart pin time and code time for things like signal generation.
    I've got nothing from it that I can 'just run' but I must admit that once I have adjusted some of the above problems, I end up with good code in probably less time than without it.

  • how did you figure out where AI actually made sense to use (or not use) in your projects?

    As there is so little public Spin code( versus C, Python, etc.) for AI to pull from, asking AI to write most Propeller programs -- in my opinion -- is a fool's errand. Admittedly, I'm a little sensitive because AI was used in a public presentation and the AI claimed there was an error in one of my libraries; it turned into a bit of a "Gotcha!" moment that blew up because I was able to prove that I know more about Spin2 smart pins that the AI presently does. AI erred, not me (in that particular case).

    I have asked AI to write just one actual Propeller program. At work I inherited the use of a P1 library that creates a SHA-256 hash that needed to be ported to the P2. Yes, I could have done it manually, but to save time I asked Claude to create a P2 version with the same method names. It worked fine after a few tweaks because Spin syntax can differ from other languages. The SHA-256 algorithm is well known with lots of code samples so I felt this was appropriate to save time.

    Most of the time, I will ask the AI to create a generic program that could work on anything. I do the P1/P2 specific conversions myself (e.g., converting bit-banged SPI to P2 smart pins).

    Since you asked for opinions, I suggest you learn the P1 or P2 first -- at least enough that you can write working programs, even if they're small. You will need this knowledge to correct all the errors that AI barfs out (hallucinates) when creating Spin1 or Spin2 code.

  • RaymanRayman Posts: 15,960

    My plan to add AI to robots is to have the robot send images and/or audio over WiFi or Bluetooth to PC and let it do the AI using OpenCV and such....
    Had this plan for years though and still haven't done it. Hopefully, this is the year!

    Think P2 could probably do TensorFlow Lite for Microcontrollers, but that now needs an up to date C++ compiler.
    There is riscv2 and LLVM that might do it, but it would be a lot of work to get it going probably...

Sign In or Register to comment.