Will FC support Codey?

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
jandidden
Posts: 110
http://meble-kuchenne.info.pl
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Will FC support Codey?

Post by jandidden »

Not so much a support request as a query.
Some of you must have heard from ChatGPT, which is old hat.
The new kid on the block is Codey, the programmers alter ego of ChatGPT.

I asked Codey:
"Make code for an ESP32 to measure an analog voltage."
"Sure", Codey said:

Code: Select all

const int analogInPin = 34;  // Pin for the analog input

void setup() {
  Serial.begin(9600);        // Start the serial communication with the computer
}

void loop() {
  int sensorValue = analogRead(analogInPin);  // Read analog voltage from pin
  float voltage = sensorValue * (3.3 / 4095.0); // Convert the ADC value to voltage
  Serial.println(voltage);   // Send the measured voltage to the serial monitor
  delay(1000);               // Wait for 1 second before reading again
}
Remarks: In this code, we set `analogInPin` to 34, which is the GPIO pin on the ESP32 that supports analog input. In the setup function, we start serial communication, and in the loop function, we continuously read the analog voltage from the pin, convert it to voltage, and send the measured value to the serial monitor. The delay function breaks the messaging for 1 second to avoid overloading the serial monitor.

Of course, you can modify this code to fit your needs. Let me know if you have any further questions!

:cry: :cry:

Jan

RGV250
Posts: 264
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Re: Will FC support Codey?

Post by RGV250 »

Why bother, if you want some copy and paste machine to do your thinking for you then why do you need flowcode anyway.
All it can do is copy and paste other code, it is not artificial intelligence like some try to make out. If it were not connected to the internet it would be utterly useless. When it is capable of being given a manual and writing code totally from that then I might change my opinion of it but I still do not want it to write my code for me, that is part of the challenge.
Do you get up in the morning and ask someone to fill in your crossword for you and then revel in the achievement you have just done.

Bob

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 218 times

Re: Will FC support Codey?

Post by LeighM »

Codey:
0/10
In future please read the question more carefully.

WingNut
Posts: 254
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 33 times
Been thanked: 23 times

Re: Will FC support Codey?

Post by WingNut »

LeighM wrote:
Sat May 06, 2023 10:09 am
Codey:
0/10
In future please read the question more carefully.
Don't see anything wrong with the question or answer but I'd say - AI has its place but I dont see it being supported by Flowcode. Not even sure how that would take place or the point of it.
RGV250 wrote:
Sat May 06, 2023 9:04 am
Why bother, if you want some copy and paste machine to do your thinking for you then why do you need flowcode anyway.
All it can do is copy and paste other code, it is not artificial intelligence like some try to make out. If it were not connected to the internet it would be utterly useless. When it is capable of being given a manual and writing code totally from that then I might change my opinion of it but I still do not want it to write my code for me, that is part of the challenge.
Do you get up in the morning and ask someone to fill in your crossword for you and then revel in the achievement you have just done.

Bob
In a way Flowcode has similarities - you use flowcode because its a graphical package of working macro's (methods, functions, whatever you prefer to call them) and also its in a similar vein to all those libraries available on the internet to make using software easier by someone else doing the work for you - esp with arduino. Copy and paste? No one here is writing code from scratch and thats the reason we like flowcode.
I moved from borland Turbo c to borland visual c++ years ago and loved it because it laid out all the parameters in front of you in a graphical format

jandidden
Posts: 110
Joined: Mon Feb 13, 2023 7:56 pm
Has thanked: 28 times
Been thanked: 12 times

Re: Will FC support Codey?

Post by jandidden »

@Wingnut yes that was my point. If you use Flowcode you have already decided to have someone else do the grunt work for you (sorry Ben ;-). Codey would be just a step further. And, as I said, it wasn't so much a suggestion for FC support of Codey but more a request for comments. Which I got, thank you.
Granted, Codey (and ChatGPT) are not creating anything, they select and combine from the infinity of the 'net. But isn't that also the way we work ourselves? Do we actually create something entirely new, or is the result of our deliberations based on and fed by many, many years of reading books and stuff others did? Surely none of us invented, independently, again and again, C++? Isn't it just a difference in degree?

Jan

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: Will FC support Codey?

Post by chipfryer27 »

Hi

Speaking as a non-programmer, well strictly not true as in the 80's I used machine code for Z80 chip and was also "not too terrible" with Level II BASIC for the Tandy TRS-80 (... ouch that hurt to remember) without FC I would not really be doing much with microcontrollers. As Wingnut says "nobody here is writing code" (well except for the odd C-Block I guess) due to the ease of programming FC offers. I do appreciate that "proper programmers" may just consider FC another tool in the shed, but for users like me it is invaluable.

Where I see the difference is that you, the end user, must make the decisions to create your Flowchart based on your own needs. You create your program by dragging an icon and entering parameters. It saves you time by eliminating the need to learn and write in "C" (for example). I kind of consider it the highest of high level languages :) :) :)

From what I read of AI coding, it is at present, as others state, merely taking existing work and interpreting it to fit a request. It isn't really creating anything as such but is none the less still very impressive. I'm sure as time progresses it will quickly be able to create code as after all, FC icons do that already...

Maybe I should make a feature request to the team? Let me specify (by voice, using an android of course) what component(s) I want to use, possible pins I may use, and roughly what it should collectively do then let it get on with it. :)

Regards

PS
Jan, should we credit all books to Samuel Johnson? He did after all invent the dictionary which contains every other book :lol:

LeighM
Valued Contributor
Posts: 401
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 71 times
Been thanked: 218 times

Re: Will FC support Codey?

Post by LeighM »

My point was that the code has been taken from a different context. It's Arduino code, not ESP API.
And therefore will not work with Flowcode.

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 286 times
Been thanked: 412 times

Re: Will FC support Codey?

Post by chipfryer27 »

Hi

I think that is "thee" point.

Regards

mnfisher
Valued Contributor
Posts: 962
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 511 times

Re: Will FC support Codey?

Post by mnfisher »

Speaking as a non-programmer
I disagree - definitely a programmer. At the end of the day - programming, to me at least, is creating a sequence of instructions for the 'computer' to perform a task. Whether the 'instructions' are lines of code or 'flowlines' doesn't really affect your 'job' - which is to convert an algorithm into a sequence of steps for the computer to follow.

I'd recommend - 'Algorithms + data structures = programs' (There are many books on the topic - Niklaus Wirth's is a good read (if still available?))

The language used is often irrelevant - and Flowcode is 'just' a very neat abstraction of the underlying process that you are coding for. Flowcode provides a very nice visual representation for the code.... (amongst other things - such as 'hiding' some of the complexities of setup / toolsets etc)

So - I'm sure your background in Z80 assembler and TRS-80 BASIC have stood you in good stead - an understanding of what is happening in the 'background' - etc is often very useful.

I'd encourage people to learn (and use!) a range of languages - it's fun if nothing else - create a program in two (or more) different languages. Then - you might find that a particular language is a better model for some code than others. So for data handling - SQL maybe (or Python and an SQL library) for graphics (I struggle with graphics) - something like PyGame or Fusion (for an 'out there' suggestion).. And for MCUs - Flowcode (of course)... (Though i did find a rather nice Forth implementation for the esp32 :-) )

ChatGPT (etc) seem to be just pattern matching at present - so they'll look for a similar question and pull up the 'human generated' reply. Neural nets and languages such as Prolog - match (possibly huge) datasets looking for patterns in the data. Not really artificial intelligence yet. Consciousness is a way off ?

Martin

RGV250
Posts: 264
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 23 times
Been thanked: 30 times

Re: Will FC support Codey?

Post by RGV250 »

I'd encourage people to learn (and use!) a range of languages - it's fun if nothing else
100% agree, especially if you have retired and have the time, it keeps the brain cell active. I have never understood why people do crosswords or Soduku.

I stared life with a VIC20, I could not afford the Sinclair ZX80 kit when that came out which is a shame as that would have been fun to build.

Bob

Post Reply