@paul_a_cardinale wrote:
I think that "AI" is misnamed. I think is should be called 'Artificial Stupidity'
I think the issue is Labview, not the "Artificial Stupidity" for example:
Hello chat GPT, please make me a PWM controller in C:
Ok here you go:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define PWM_PERIOD_US 20000 // PWM period in microseconds
void pwmInit() {
// Set up GPIO pins or any other hardware initialization
// For example, if you're using the Raspberry Pi GPIO:
// Initialize GPIO pin as output
// gpioSetMode(pinNumber, PI_OUTPUT);
}
void pwmWrite(int pin, float dutyCycle) {
int pulseWidth = (int)(PWM_PERIOD_US * dutyCycle);
// Set the pin high
// For example, if you're using the Raspberry Pi GPIO:
// gpioWrite(pin, PI_HIGH);
// Delay for the pulse width duration
usleep(pulseWidth);
// Set the pin low
// For example, if you're using the Raspberry Pi GPIO:
// gpioWrite(pin, PI_LOW);
// Delay for the remaining period
usleep(PWM_PERIOD_US - pulseWidth);
}
int main() {
pwmInit(); // Initialize PWM
// Example usage: Generate a PWM signal with a duty cycle of 50% on pin 18
int pwmPin = 18;
float dutyCycle = 0.5;
while (1) {
pwmWrite(pwmPin, dutyCycle);
}
return 0;
}
Hello Dall-E, please make me a PWM controller in Labview:
Response:
... lol : )
I think our jobs are safe for now.
______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.