I just wanted to report my positive experience by using AI LLM tools like ChatGPT and Claude to support me by the development of my latest project source code.
It is to operate a fluid detection system using a photosensor. The whole code is 800 lines big (and I not count all comments inside), and I assume that between 80% to 90% was fully generated by the combination of both LLM mentioned previously. The generated code is strong, work very well and let me win weeks and weeks of hobbyst development periods.
I also learned that some nice syntax in GCBASIC are possible like:
I am always struggeling with langage syntax and that is the reason why I never learned C++, I was so happy to discover GCBASIC for doing something with microcontrollers. Thank to the whole Team behind.
To give you an idea of the hardware used, please check both pictures. The project uses a PIC16F1825.
See also an example (sorry it is in French, but source code comments in English) how I interact with Claude, and how a non blocking Buzzer routine was generated by Claude. First compilation, 0 errors and work as expected - good :)
Lasolution:unemachined'état non-bloquante similaire à ServiceBuzzer(), appelée ServiceConfirmFeedback().Elleré-asserteraLedRedetBuzzeràchaqueitérationdebouclependantlaphaseON,cequisurpasseUpdateOutput()puisqu'elle s'exécuteaprès.Nouvellesconstantesàajouter#DEFINE CONFIRM_FEEDBACK_ON = 2 // ON duration per blink: 2 * 50ms = 100ms#DEFINE CONFIRM_FEEDBACK_OFF = 2 // OFF duration per blink: 2 * 50ms = 100msNouvellesvariablesglobalesàajouter//Non-blockingconfirmfeedbackstatemachineDimconfirmFeedbackActiveAsBit//1=feedbacksequenceisrunningDimconfirmFeedbackStateAsBit//1=ONphase(LED+buzzeron),0=OFFphaseDimconfirmFeedbackCountAsByte//Remainingblinks/beepstoproduceDimconfirmFeedbackTickAsByte//BuzzerTicksnapshotatlastphasetransitionDimconfirmFeedbackElapsedAsByte//ElapsedtickssincelastphasetransitionNouvellesinitialisationsàajouterconfirmFeedbackActive=0//NofeedbackrunningatstartupconfirmFeedbackState=0//StartinOFFphaseconfirmFeedbackCount=0//NoblinkspendingconfirmFeedbackTick=0//TickreferenceclearedCycleConfirmLevel()—versionnon-bloquante//----------------------------------------------------------//CycleConfirmLevel//Advancesconfirmlevel:1→2→...→8→1(wrapsaround)//UpdatesoutputConfirmimmediatelyfortherunningloop//Resetspersistencecountertoavoidstaleaccumulatedcount//SavesnewlevelindextoEEPROM//Launchesnon-blockingN-blink+N-beepfeedbacksequence//Anewbuttonpresswhilefeedbackrunsrestartsitcleanly//----------------------------------------------------------SubCycleConfirmLevel()confirmLevel++//AdvancetonextlevelindexIfconfirmLevel>CONFIRM_MAXThen//Wraparoundafterlevel8confirmLevel=CONFIRM_MIN//Backtolevel1(100iterations)EndIfoutputConfirm=confirmLevel*CONFIRM_STEP//ApplynewthresholdimmediatelyoutputCounter=0//Resetpersistence:restartcountingCallSaveConfirmLevel()//PersistnewindextoEEPROM//Launchnon-blockingN-blink+N-beepfeedback//DisablingServiceBuzzerpreventsBuzzerconflictduringfeedbackBuzzerEnable=0//SuspendanyrunningbuzzersequenceBuzzer=0//EnsurecleanbuzzerstartstateLedRed=0//EnsurecleanLEDstartstateconfirmFeedbackCount=confirmLevel//Nblinks=selectedlevelindexconfirmFeedbackTick=BuzzerTick//CapturecurrenttickasstartreferenceconfirmFeedbackState=1//BeginwithONphaseimmediatelyconfirmFeedbackActive=1//EnablethefeedbackserviceroutineLedRed=1//Firstblink:LEDonimmediatelyBuzzer=1//Firstbeep:buzzeronimmediatelyEndSubNouvellesous-routineServiceConfirmFeedback()//----------------------------------------------------------//ServiceConfirmFeedback//Non-blockingN-blink+N-beepfeedbackforconfirmlevelchange//MustbecalledAFTERUpdateOutput()andServiceBuzzer()inmainloop//Re-assertsLedRedandBuzzereachiterationduringONphase,//overridingUpdateOutput()sinceitrunsafterit//BuzzerEnable=0preventsServiceBuzzer()frominterferingwithBuzzer//AnewbuttonpressrestartsthesequencecleanlyviaCycleConfirmLevel()//----------------------------------------------------------SubServiceConfirmFeedback()IfconfirmFeedbackActive=0Then//Nofeedbackrunning:nothingtodoExitSubEndIfconfirmFeedbackElapsed=BuzzerTick-confirmFeedbackTick//TickssincelastphasechangeIfconfirmFeedbackState=1Then//CurrentlyinONphase(LED+buzzeractive)LedRed=1//Re-asserteveryiteration:overrideUpdateOutputBuzzer=1//Re-asserteveryiteration:keepbuzzeronIfconfirmFeedbackElapsed>=CONFIRM_FEEDBACK_ONThen//ONdurationelapsed?LedRed=0//TurnoffLEDBuzzer=0//TurnoffbuzzerconfirmFeedbackState=0//SwitchtoOFFphaseconfirmFeedbackTick=BuzzerTick//RecordOFFphasestarttimeEndIfElse//CurrentlyinOFFphase(LED+buzzeroff)IfconfirmFeedbackElapsed>=CONFIRM_FEEDBACK_OFFThen//OFFdurationelapsed?confirmFeedbackCount--//CountthiscompletedblinkIfconfirmFeedbackCount=0Then//AllNblinksdone?confirmFeedbackActive=0//StopfeedbacksequenceLedRed=0//EnsureLEDisoffBuzzer=0//EnsurebuzzerisoffExitSub//DoneEndIf//Moreblinksremaining:startnextONphaseLedRed=1//LEDonfornextblinkBuzzer=1//BuzzeronfornextbeepconfirmFeedbackState=1//EnterONphaseconfirmFeedbackTick=BuzzerTick//RecordONphasestarttimeEndIfEndIfEndSubModificationdelaboucleprincipaleAjouterServiceConfirmFeedback()aprèsServiceBuzzer()etavantServiceHeartbeat():CallUpdateOutput()//Applypersistencefilter;drivepumpandLEDsCallProcessEvents()//TranslateeventcodeintobuzzerpatternCallServiceBuzzer()//Executenon-blockingbuzzersequenceCallServiceConfirmFeedback()//Executenon-blockingN-blink/beepconfirmfeedbackCallServiceHeartbeat()//ManageblueLEDheartbeat(systemaliveindicator)PourquoiçafonctionnesansbloquerMécanismeExplicationPasdeWaitLaroutineretourneimmédiatementsiletickn'a pas changéRé-assertionchaqueitérationPendantlaphaseON,LedRed=1etBuzzer=1sontréécritsaprèsUpdateOutput()Prioritéparordred'appel ServiceConfirmFeedback() s'exécuteaprèsUpdateOutput()→savaleurestladernièreécriteAppuirapideUnnouvelappuipendantlefeedbackrelanceCycleConfirmLevel()quiréinitialiseproprementlamachined'état
I have started with ChatGPT and complete with Claude. I have no commercial API only free versions, so I worked on the project step by step as soon I received few tokens to continu :)
AI Claude provide much better code, but ChatGPT explained more the background and how technically the whole PWM -> Analog -> Led // Phototransistor -> ADC Reading work together. I have a lot of conversationnel pages with ChatGPT to obtain a final result.
Once having a fully code, I have asked Claude to make a final pass, find dead variables even routines, add on every line a comment in English, check if code can be optimised and make proposals.
I am really happy with the result, but I am not ready yet to share the project. KiCad source are not polished, and I had still need to do some afterwork.
In the meantime, if someone have a particular related question, just ask here :) Thank
Last edit: Fabrice Engel 2026-06-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear GCBASIC Community,
I just wanted to report my positive experience by using AI LLM tools like ChatGPT and Claude to support me by the development of my latest project source code.
It is to operate a fluid detection system using a photosensor. The whole code is 800 lines big (and I not count all comments inside), and I assume that between 80% to 90% was fully generated by the combination of both LLM mentioned previously. The generated code is strong, work very well and let me win weeks and weeks of hobbyst development periods.
I also learned that some nice syntax in GCBASIC are possible like:
I am always struggeling with langage syntax and that is the reason why I never learned C++, I was so happy to discover GCBASIC for doing something with microcontrollers. Thank to the whole Team behind.
To give you an idea of the hardware used, please check both pictures. The project uses a PIC16F1825.
See also an example (sorry it is in French, but source code comments in English) how I interact with Claude, and how a non blocking Buzzer routine was generated by Claude. First compilation, 0 errors and work as expected - good :)
Last edit: Fabrice Engel 2026-06-02
Great to hear.
The source for this AI? The demonstrations ojn GitHub, the extensive Help and this Forum.
I use Claude! it is better and faster then me coding it!
I have started with ChatGPT and complete with Claude. I have no commercial API only free versions, so I worked on the project step by step as soon I received few tokens to continu :)
AI Claude provide much better code, but ChatGPT explained more the background and how technically the whole PWM -> Analog -> Led // Phototransistor -> ADC Reading work together. I have a lot of conversationnel pages with ChatGPT to obtain a final result.
Once having a fully code, I have asked Claude to make a final pass, find dead variables even routines, add on every line a comment in English, check if code can be optimised and make proposals.
I am really happy with the result, but I am not ready yet to share the project. KiCad source are not polished, and I had still need to do some afterwork.
In the meantime, if someone have a particular related question, just ask here :) Thank
Last edit: Fabrice Engel 2026-06-03