Creating an executable in Python
11:45
Calculator version 2 using AI Python
13:50
Examples of AI Music (some pretty good)
15:17
Code Copilot and ChatGPT
13:29
Ай бұрын
Neon Pulse - AI Music
3:17
Ай бұрын
Unitree Robotics robot
1:14
Ай бұрын
AI Song for Europe
2:12
2 ай бұрын
Scottish AI Songs 2
12:37
2 ай бұрын
AI Generated Scottish Songs
9:15
2 ай бұрын
AI Music summarised from Udio
4:24
More Music Generated by AI - Udio
33:47
AI Music Generator
15:53
2 ай бұрын
Enigma of the skies in NE Scotland.
2:00:43
Portable Software Defined Radio
10:01
Пікірлер
@johnsim3722
@johnsim3722 8 күн бұрын
You're going to have some very disappointed views who thought you were talking about a different type of Latex... I never knew LaTeX was an interpreted language for DTP. My first real experience of DTP was on the BBC Master, but it had to use floppy disc to cache pages, and part pages at that. It was a very slow process to scroll and for that unusable in practice. Second experience was on the Acorn Archimedes A440/1. Now we had a fully 32 bit WIMP OS running on a very fast RISC processor, which made it quicker than x86 and 68040 machines of the time, even though it was only running at 8MHz. Even Microsoft didn't have a useable version of Window yet, and it would spend years running in 16-bits on a 32-bit computer. Windows 95 was the introduction by Microsoft to a 32-bit OS, but large parts of it was still 16-bit. Microsoft was nearly a decade behind. On the Archimedes there was a couple of different DTP packages, but the main and best seemed to be Impression, by Computer Concepts. They also had an equation editor package to add on this, Equasor. That equation editor was super easy and intuitive to use, and even when Microsoft eventually created Word and their own equation editor, Impression and Equasor both were far more useable. Big difference I found was that with Impression once you created the document, it never changed. But with word you could move to a different computer, with a different printer attached, and it would change all your layouts. Suddenly page gaps opened up, and your reference to the above diagram changed as it disappeared off to a different page!
@TJMoir
@TJMoir 8 күн бұрын
It's a text based language that describes equations more or less. In this way you can reduce the size of a document by a huge amount and the layout of the maths is usually much better than say Word. Also Word has a proprietary method of storage and this is open source and runs on any platform nowadays. Used to be Unix.
@johnsim3722
@johnsim3722 8 күн бұрын
@@TJMoir I was aware it was still going, but that was the limit of my knowledge. I never went looking for it. Open Office seems to be the choice for open source and free office packages, and I've installed it for a couple of older friends who need to do the occasional letter or wanted a spreadsheet to keep track of budgets. They didn't need anything too complex and Microsoft Office seemed far too expensive for what they needed. I get annoyed with Microsoft adding and deleting Publisher from their Office package! I use publisher because it's a better DTP than Word, which is more a document processor. With Publisher you can format the layouts of each page much better. When you're doing an instruction manual, that's much better. But also I print labels through Publisher and keeping a layout mixed with images, texts, and mail merged fields (for a serial number - still no proper automatic indexing for this!), you need the control that it has. One thing I'd say is that you always find that other software seems easier to use than the Microsoft version. This got really bad with the introduction of the Ribbon, removing menus that backed the icons it normally had. They made it hard to find how to do what seasoned users could easily do. Made you have to hunt to try and find how to do an equation! Hide the features to add the features. You get the impression that those who are in charge of product development have never used their own products. Have no idea how their products would be used. And therefore, what people need and more importantly, what power users really need. And if you're selling what is a premium product, that should be easy to accommodate. Hence why even given a free choice, I'd probably still recommend to those older friends the open source solutions. Because they're a bit more simple, a bit more obvious on how to use.
@johnsim3722
@johnsim3722 15 күн бұрын
I see now how Geordi La Forge was able to program the Enterprise so easily! The computer doing its own programming.
@TJMoir
@TJMoir 15 күн бұрын
Sci Fi and fact are getting closer by the day. A robot that needs to change software for a manipulator might well create its own code! Humans would have to prevent it from updating itself. at present of course it has no consciousness but it is thought in a few years......
@johnsim3722
@johnsim3722 15 күн бұрын
@@TJMoir Where we're going to get to first is where an AI decides it needs a type of function and writes it. What it does from there, and how quickly it advances off that point, really is the stuff of Sci Fi. Terminator etc. where the AI takes over, but it's not the first. Look at Colossus: The Forbin Project, or even War Games.
@TJMoir
@TJMoir 16 күн бұрын
Here's the code. import tkinter as tk import math class ScientificCalculator: def __init__(self, master): self.master = master master.title("Scientific Calculator") master.configure(bg='silver') self.display = tk.Entry(master, font=("Arial", 24), width=30, justify='right', bd=10, relief="sunken", bg='white') self.display.grid(row=0, column=0, columnspan=5, padx=10, pady=10) self.buttons = {} self.create_buttons() self.radians = True def create_buttons(self): buttons = [ 'C', '(', ')', '/', 'sqrt', '7', '8', '9', '*', 'x^y', '4', '5', '6', '-', 'sin', '1', '2', '3', '+', 'cos', '0', '.', '=', 'tan', '1/x', 'arcsin', 'arccos', 'arctan', 'Rad', 'exp(x)', 'π', '+/-', '%', 'ln', 'log10', 'x^2' ] row = 1 col = 0 for i, button in enumerate(buttons): command = lambda x=button: self.click(x) self.buttons[button] = tk.Button(self.master, text=button, font=("Arial", 18), command=command, height=2, width=5, bd=5, relief="raised", bg='lightgray') self.buttons[button].grid(row=row, column=col, sticky='nsew', padx=5, pady=5) col += 1 if col > 4: col = 0 row += 1 def click(self, key): if key == '=': try: expression = self.display.get() if '%' in expression: nums = expression.split('%') result = float(nums[0]) * float(nums[1]) / 100 else: result = eval(expression) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'C': self.display.delete(0, tk.END) elif key == '+/-': try: current_value = float(self.display.get()) new_value = -current_value self.display.delete(0, tk.END) self.display.insert(tk.END, str(new_value)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'x^2': try: value = float(self.display.get()) result = value ** 2 self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key in ['sin', 'cos', 'tan']: try: value = float(self.display.get()) if not self.radians: value = math.radians(value) result = getattr(math, key)(value) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key in ['arcsin', 'arccos', 'arctan']: try: value = float(self.display.get()) if key in ['arcsin', 'arccos'] and (value < -1 or value > 1): raise ValueError("Input out of range for arcsin/arccos") result = getattr(math, 'a' + key[3:])(value) if not self.radians: result = math.degrees(result) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except Exception as e: self.display.delete(0, tk.END) self.display.insert(tk.END, f"Error: {str(e)}") elif key == 'sqrt': try: result = math.sqrt(float(self.display.get())) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'x^y': self.display.insert(tk.END, '**') elif key == 'exp': self.display.insert(tk.END, 'math.exp(') elif key == '1/x': try: result = 1 / float(self.display.get()) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'Rad': self.radians = not self.radians self.buttons['Rad'].config(text="Rad" if self.radians else "Deg") elif key == 'exp(x)': try: value = float(self.display.get()) result = math.exp(value) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'π': self.display.insert(tk.END, str(math.pi)) elif key == 'ln': try: value = float(self.display.get()) result = math.log(value) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") elif key == 'log10': try: value = float(self.display.get()) result = math.log10(value) self.display.delete(0, tk.END) self.display.insert(tk.END, str(result)) except: self.display.delete(0, tk.END) self.display.insert(tk.END, "Error") else: self.display.insert(tk.END, key) root = tk.Tk() for i in range(1, 7): root.grid_rowconfigure(i, weight=1) for i in range(5): root.grid_columnconfigure(i, weight=1) calculator = ScientificCalculator(root) root.mainloop()
@TJMoir
@TJMoir Ай бұрын
Code: #Screen scraper from a URL #import requests # T.J.Moir and chatGPT import requests as requests import winsound from bs4 import BeautifulSoup import os import tkinter as tk from tkinter import simpledialog from gtts import gTTS import shutil # for beep sound frequency = 500 # Set Frequency To 500 Hertz duration = 500 # Set Duration To 500 ms == 0.5 second # Create the root window root = tk.Tk() root.geometry('500x100+1200+500') root.title("Screen Scraper") # Set window title # Create a StringVar to associate with the label text_var = tk.StringVar() text_var.set("Screen Scraper") # Create the label widget with all options label = tk.Label(root, textvariable=text_var, anchor=tk.CENTER, bg="white", height=3, width=30, bd=3, font=("Times", 16, "bold"), cursor="hand2", fg="Grey", padx=15, pady=15, justify=tk.CENTER, relief=tk.RAISED, wraplength=250 ) # Pack the label into the window label.pack(pady=20) # Add some padding to the top #hide root window #root.withdraw() winsound.Beep(frequency, duration) # Load the URL of web page to scrape url= simpledialog.askstring("Input", "URL for screenscrape") # Send a GET request to the URL response = requests.get(url) # Parse the HTML content soup = BeautifulSoup(response.content, 'html.parser') # Extract the desired data (example: all paragraphs) paragraphs = soup.find_all('p') # Get the user's home directory home_dir = os.path.expanduser('~') text_var.set("Please wait, doing audio first") text="" # Print the text of each paragraph for p in paragraphs: text+= p.get_text() tts = gTTS(text, lang='en-uk') #mp3 director is same as one for text file mp3_dir = os.path.join(home_dir, 'Downloads\screenscraper') # Construct the path to the folder. I created a folder under Downloads called screenscraper download_dir = os.path.join(home_dir, 'Downloads\screenscraper') # Ensure the Desktop directory exists if not os.path.exists(download_dir): raise FileNotFoundError(f"The directory {download_dir} does not exist.") winsound.Beep(frequency, duration) # Create the input dialog mp3_name = simpledialog.askstring("Input", "Enter .mp3 filename:") # Save the audio file tts.save(mp3_name) # move file to desired directory screenscraper shutil.move(mp3_name, download_dir) text_var.set("Finished audio part") winsound.Beep(frequency, duration) # Create the input dialog file_name = simpledialog.askstring("Input", "Enter filename:") # Destroy the root window root.destroy() # Full path to the file file_path = os.path.join(download_dir, file_name) # Save the text to a file with open(file_path, 'w', encoding='utf-8') as file: for p in paragraphs: file.write(p.get_text() + ' ')
@titusfouroh
@titusfouroh Ай бұрын
Oh, how dreadful.
@titusfouroh
@titusfouroh Ай бұрын
The work is not dreadful, but the result sure is chilling.
@johnsim3722
@johnsim3722 Ай бұрын
It's pretty good "wallpaper". Something that fits the type, but isn't distinctive enough to be a hit by itself. But listen to dance music on Radio 1 and this would slot right in too.
@TJMoir
@TJMoir Ай бұрын
yes it sounds generic but then again a great dela of music is generic and nobody blinks an eyelid! If you'd asked me 10 years ago if this was possible I would have said no!
@johnsim3722
@johnsim3722 Ай бұрын
@@TJMoir I really enjoy Leftfield and have their first two albums, Leftism and Rhythm & Stealth. Tracks from these have been used in film, in TV, in advertising. They're massive hits. First time I heard them was the opening of Shallow Grave, filmed Glasgow / Edinburgh. They split up, sadly, but I just noticed that the one who continued with the Leftfield name has produced two new albums, Alternative Light Source, This Is What We Do. I bought the last two and it quickly became clear that the talent of Leftfield was in the guy who left! What remained was just generic music that had nothing in it worth a second listen. Some of it was embarrassingly bad. The AI song has in a way matched what a real person could do. Just that extra creative spark to make something legendary wasn't there, but then not everybody has that either.
@johnsim3722
@johnsim3722 Ай бұрын
Hmm... Funny how on the image you can see on the phone you can't see any bunny ears yet the AI allegedly could. Only the view we had were they visible. How did the AI know if it weren't told by some other means? It still looks more like a very advanced pattern recognition system, both in interpreting the view presented and creating music in a style that it believes to be a song.
@TJMoir
@TJMoir Ай бұрын
If you look closely you can see her on the screen - just!
@johnsim3722
@johnsim3722 Ай бұрын
@@TJMoir I think I see it now for a second or two right at the end of her being there. Although it does look more that the Chinese were spying on this video... :-)
@solhappiness5628
@solhappiness5628 3 ай бұрын
...vengo de Wikipedia, buscando información y esto es exactamente li que oimos
@solhappiness5628
@solhappiness5628 3 ай бұрын
... una amiga mía y yo únicamente lo escuchamos... nadie más
@solhappiness5628
@solhappiness5628 3 ай бұрын
Oigo lo mismo.en España. A todas horas,es horrible
@marc_frank
@marc_frank 4 ай бұрын
i guess it's the same tradeoff as on a pc, speed of developement vs speed of execution
@TJMoir
@TJMoir 4 ай бұрын
Code: // Basic demo for accelerometer readings from Adafruit MPU6050 //Kalman filter added by T.J.Moir 8/5/2021 and angle calculation // ESP32 Guide: RandomNerdTutorials.com/esp32-mpu-6050-accelerometer-gyroscope-arduino/ // ESP8266 Guide: RandomNerdTutorials.com/esp8266-nodemcu-mpu-6050-accelerometer-gyroscope-arduino/ // Arduino Guide: RandomNerdTutorials.com/arduino-mpu-6050-accelerometer-gyroscope/ #include <Adafruit_MPU6050.h> #include <Adafruit_Sensor.h> #include <Wire.h> float angX,angY,dangZ1,dangZ2,dangZ3,angZ; //Kalman filter data float f11,f12,f21,f22,fc11,fc12,fc21,fc22; float d11,d12,d21,d22; //states float xh1k,xh2k,xh1k_1,xh2k_1; float s1,s2; //observations, angular position and angular velocity from accelerometer angles and gyro info //H matrix is identity //Filter gain matrix float k11,k12,k21,k22; //sampling freq and interval float fs,Ts; // for sampling freq int sample_pin=16; boolean running = false; Adafruit_MPU6050 mpu; void setup(void) { pinMode(sample_pin,OUTPUT); sample_pin=false; /////////////////////////// //sampling frequency fs=10000.0; //sampling interval Ts=1/fs; f11=1; f12=-Ts; f21=0.0; f22=1.0; d11=Ts; d12=-Ts*Ts*0.5; d21=0.0; d22=Ts; //Kalman gains have been calculated offline for Q=I,R=I*1e-5; k11=0.0311; k12=-5.1556e-5; k21=-4.8444e-5; k22=0.0311; // //initialise state estimates xh1k=0.0; xh2k=0.0; xh1k_1=0.0; xh2k_1=0.0; /////// //calculate Kalman filter Fc closed loop F matrix. Note H=I identity matrix Fc=F-KH (K has been found offline) fc11=f11-k11; fc12=f12-k12; fc21=f21-k21; fc22=f22=k22; ///// Serial.begin(115200); while (!Serial) //delay(10); // will pause Zero, Leonardo, etc until serial console opens //Serial.println("Adafruit MPU6050 test!"); // Try to initialize! if (!mpu.begin()) { //Serial.println("Failed to find MPU6050 chip"); while (1) { delay(10); } } //Serial.println("MPU6050 Found!"); mpu.setAccelerometerRange(MPU6050_RANGE_8_G); //Serial.print("Accelerometer range set to: "); switch (mpu.getAccelerometerRange()) { case MPU6050_RANGE_2_G: // Serial.println("+-2G"); break; case MPU6050_RANGE_4_G: //Serial.println("+-4G"); break; case MPU6050_RANGE_8_G: //Serial.println("+-8G"); break; case MPU6050_RANGE_16_G: //Serial.println("+-16G"); break; } mpu.setGyroRange(MPU6050_RANGE_500_DEG); //Serial.print("Gyro range set to: "); switch (mpu.getGyroRange()) { case MPU6050_RANGE_250_DEG: //Serial.println("+- 250 deg/s"); break; case MPU6050_RANGE_500_DEG: // Serial.println("+- 500 deg/s"); break; case MPU6050_RANGE_1000_DEG: //Serial.println("+- 1000 deg/s"); break; case MPU6050_RANGE_2000_DEG: //Serial.println("+- 2000 deg/s"); break; } mpu.setFilterBandwidth(MPU6050_BAND_5_HZ); //Serial.print("Filter bandwidth set to: "); switch (mpu.getFilterBandwidth()) { case MPU6050_BAND_260_HZ: //Serial.println("260 Hz"); break; case MPU6050_BAND_184_HZ: //Serial.println("184 Hz"); break; case MPU6050_BAND_94_HZ: //Serial.println("94 Hz"); break; case MPU6050_BAND_44_HZ: //Serial.println("44 Hz"); break; case MPU6050_BAND_21_HZ: //Serial.println("21 Hz"); break; case MPU6050_BAND_10_HZ: //Serial.println("10 Hz"); break; case MPU6050_BAND_5_HZ: //Serial.println("5 Hz"); break; } //Serial.println(""); delay(100); } void loop() { /* Get new sensor events with the readings */ sensors_event_t a, g, temp; mpu.getEvent(&a, &g, &temp); /* Print out the values */ /* Serial.print("Acceleration X: "); Serial.print(a.acceleration.x); Serial.print(", Y: "); Serial.print(a.acceleration.y); Serial.print(", Z: "); Serial.print(a.acceleration.z); Serial.println(" m/s^2");*/ //dangZ1=sqrt(a.acceleration.z*a.acceleration.z+a.acceleration.x*a.acceleration.x); dangZ2=sqrt(a.acceleration.z*a.acceleration.z+a.acceleration.y*a.acceleration.y); //dangZ3=sqrt(a.acceleration.x*a.acceleration.x+a.acceleration.y*a.acceleration.y); //angX=57.29*atan2(a.acceleration.y,dangZ1); //Serial.println(angX); //roll angY=57.29*atan2(a.acceleration.x,dangZ2); // Serial.println(angY); //pitch angle in degrees only //angZ=57.29*atan2(a.acceleration.z,dangZ3); //Serial.println(angZ); //Pitch wrt 90 degrees //Kalman filter here s1= angY; //angular position from accelerometer calculation s2=g.gyro.y;//from gyro angular velocity //shuffle regressors of the states xh1k_1=xh1k; xh2k_1=xh2k; xh1k=fc11*xh1k_1 +fc12*xh2k_1+k11*s1+k12*s2; xh2k=fc21*xh1k_1 +fc22*xh2k_1+k21*s1+k22*s2; /* Serial.print("\t"); Serial.print(s1); //noisy angle estimate of pitch Serial.print(" "); */ Serial.println(xh1k); //KF pitch angle estimate // Serial.println(xh2k); //KF pitch angular velocity estimate // Sets a flag at a precise time. ////// // To measure the sample rate from pin 21 digitalWrite(sample_pin,running); running=!running; /* Serial.print("Rotation X: "); Serial.print(g.gyro.x); Serial.print(", Y: "); Serial.print(g.gyro.y); Serial.print(", Z: "); Serial.print(g.gyro.z); Serial.println(" rad/s"); Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.println(" degC"); Serial.println(""); */ //delay(5); }
@satyabratasenapati7376
@satyabratasenapati7376 4 ай бұрын
Very useful 😂
@nesdi6653
@nesdi6653 4 ай бұрын
More
@JoseMolina-dm8pu
@JoseMolina-dm8pu 5 ай бұрын
Hey T.J , I was wondering if you still have the parts and software that is needed to recreate this component? I would like to try this myself!
@TJMoir
@TJMoir 5 ай бұрын
This was a project a good 7 or 8 years ago. The supervisor has since retired. But from what I remember it was mainly FPGAs made into a small board. The "lighthouse" was already available from a game if I remember.
@nannerz1994
@nannerz1994 5 ай бұрын
I just noticed a couple days ago because I got a new couch and I'm in my living room more. It was pulsating until a couple minutes ago now it's just consistent. I'm in Los Angeles
@wilfriedpacomemenye739
@wilfriedpacomemenye739 6 ай бұрын
Please can you know how i can use this with gps to estimate the position in space? It's for my School project
@TJMoir
@TJMoir 6 ай бұрын
A spaceship uses a Gyro and Accelerometer. Each inertial measurement unit has three gyroscopes and three accelerometers -- one gyro and one accelerometer for each axis of the spacecraft. x y and z. From acceleration and velocity (angular for both) we can estimate position in each axis using a Kalman Filter. ie how far in each axis the spaceship has turned. You would need at least 6 states, two for each axis but possibly more (I think Apollo had 12). But this only gives a relative position to a past position, you need an absolute measurement so on earth we can use GPS and on say Mars you would need a star fix from a star tracker. When Apollo took off it had a fix for the Gyros from earth but from the Moon they must have used a star to fix absolute position (though all such measurements are relative of course and there are no absolutes in space). With no Kalman filter you would need to somehow combine the Gyro and Accelerometer readings using a cruder method. You would also need to integrate and this gives drift and errors.
@TJMoir
@TJMoir 6 ай бұрын
/********* Rui Santos Complete project details at RandomNerdTutorials.com/esp32-web-server-slider-pwm/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Modified by T.J.Moir Jan 2024 to add a Quad Encoder and OLED Display Find the IP address first from this program then type it into a browser on another computer connected to the same wi-fi Look at the serial output to find IP address *********/ // Import required libraries #include <WiFi.h> #include <AsyncTCP.h> #include <ESPAsyncWebSrv.h> //Dimmer Quadrature encoder: change these numbers as required #define outputA 35 #define outputB 32 // For Display #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for SSD1306 display connected using I2C #define OLED_RESET -1 // Reset pin #define SCREEN_ADDRESS 0x3C Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); /* Vcc is 3.3v SCL is pin 22 SDA is pin 21 Also needs ground pin */ int brightness; int enable1Pin = 26; //PWM volatile int counter=0; // for sampling freq int sample_pin=27; // Setting PWM properties const int freq =200; const int pwmChannel = 0; //PWM resolution const int resolution = 8; ///////////////////// // Replace with your network credentials const char* ssid = "xxxxx"; const char* password = "xxxxx"; ///////////////////////////// ///////////// void IRAM_ATTR isr_quadencoder() { // quadrature encoder if(digitalRead(outputA) == digitalRead(outputB)) { //Clockwise counter++; } else { //Counter Clockwise counter--; } } ///////////////// String sliderValue = "0"; const char* PARAM_INPUT = "value"; int setpoint_web=0; // Create AsyncWebServer object on port 80 AsyncWebServer server(80); const char index_html[] PROGMEM = R"rawliteral( <!DOCTYPE HTML><html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>ESP Web Server</title> <style> html {font-family: Arial; display: inline-block; text-align: center;} h2 {font-size: 2.3rem;} p {font-size: 1.9rem;} body {max-width: 400px; margin:0px auto; padding-bottom: 25px;} .slider { -webkit-appearance: none; margin: 14px; width: 360px; height: 25px; background: #AFD65C; outline: none; -webkit-transition: .2s; transition: opacity .2s;} .slider::-webkit-slider-thumb {-webkit-appearance: none; appearance: none; width: 35px; height: 35px; background: #003249; cursor: pointer;} .slider::-moz-range-thumb { width: 45px; height: 35px; background: #003249; cursor: pointer; } </style> </head> <body> <h2>ESP Toms Server </h2> <p><span id="textSliderValue">%SLIDERVALUE%</span></p> <p><input type="range" onchange="updateSliderPWM(this)" id="pwmSlider" min="0" max="255" value="%SLIDERVALUE%" step="1" class="slider"></p> <script> function updateSliderPWM(element) { var sliderValue = document.getElementById("pwmSlider").value; document.getElementById("textSliderValue").innerHTML = sliderValue; console.log(sliderValue); var xhr = new XMLHttpRequest(); xhr.open("GET", "/slider?value="+sliderValue, true); xhr.send(); } </script> </body> </html> )rawliteral"; // Replaces placeholder with button section in your web page String processor(const String& var){ //Serial.println(var); if (var == "SLIDERVALUE"){ return sliderValue; } return String(); } boolean running = false; void setup(){ // Serial port for debugging purposes Serial.begin(115200); // Connect to Wi-Fi WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.println("Connecting to WiFi.."); } // Print ESP Local IP Address Serial.println(WiFi.localIP()); // Route for root / web page server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send_P(200, "text/html", index_html, processor); }); // Send a GET request to <ESP_IP>/slider?value=<inputMessage> server.on("/slider", HTTP_GET, [] (AsyncWebServerRequest *request) { String inputMessage; // GET input1 value on <ESP_IP>/slider?value=<inputMessage> if (request->hasParam(PARAM_INPUT)) { inputMessage = request->getParam(PARAM_INPUT)->value(); sliderValue = inputMessage; //ledcWrite(ledChannel, sliderValue.toInt()); } else { inputMessage = "No message sent"; } // Get the setpoint from remote computer setpoint_web=sliderValue.toInt(); //Serial.println(inputMessage); request->send(200, "text/plain", "OK"); }); // Start server server.begin(); //////////////// // initialize the OLED object if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { Serial.println(F("SSD1306 allocation failed")); for(;;); // Don't proceed, loop forever } // Clear the display buffer. display.clearDisplay(); pinMode(enable1Pin, OUTPUT);//PWM pinMode (outputA,INPUT);//Encoder input A pinMode (outputB,INPUT);//Encoder input B pinMode(sample_pin,OUTPUT);//Sampling freq measure with scope attachInterrupt(outputA,isr_quadencoder, FALLING); // configure LED PWM functionalitites ledcSetup(pwmChannel, freq, resolution); // attach the channel to the GPIO to be controlled ledcAttachPin(enable1Pin, pwmChannel); } void loop() { if(counter>255){counter=255;} if(counter<0){counter=0;} brightness = abs(counter+setpoint_web); //Serial.println(brightness); if(brightness>255){brightness=255;} if(brightness<0){brightness=0;} //PWM Must take absolute value ledcWrite(pwmChannel, brightness); // To measure the sample rate from pin 21 digitalWrite(sample_pin,running); running=!running; // Display display.setTextColor(WHITE); // text display.setCursor(0,0); display.setTextSize(2); display.println("Brightness"); display.setTextSize(3); display.setCursor(0,30); display.println(brightness); display.display(); display.clearDisplay(); // Need a time delay delay(4); // end endless main loop }
@mberoakoko24
@mberoakoko24 6 ай бұрын
I found this very randomly sir, this has peaked my curiosity alot , thank you sir.
@TJMoir
@TJMoir 6 ай бұрын
Thank you, glad you found it of use.
@johnsim3722
@johnsim3722 6 ай бұрын
I'm trying to remember where I had to do something that had to use the instantaneous values for control, but I did a smoothing of the values and only output via serial every so often. The serial data needed to be slower simply because of the data rate so I had to decimate the data going out. Thankfully in that situation you're not having to use the main processor to output individual bits as you load up the registers of the serial port and let it deal with it after that. Often with code I try and write it in a style that I call "drop through". That is, nothing will block the code execution from top to bottom and repeating. A lot of functions I turn in to state machines and the main code is checking what state and if it needs to move to the next state, service that state and drop through the code to repeat the next time round. Sometimes there's counters in there too so that it doesn't just go straight in to the next state but has to wait, effectively a time out before executing the next part. Handy for de-bouncing I/Os. In this case I might have the loop for doing the control of the motor looping but a state machine to work through the digits for display, with the I2C output of the micro being updated with new data each time. Of course it is very dependant upon the implementation of the I2C module inside the micro. With the serial interface you'd have one byte being sent out with another then being loaded ready to go next. Looping through you could check if it was ready for a new byte rather than waiting.
@TJMoir
@TJMoir 6 ай бұрын
That's some very good advice John. You are well skilled in the black arts of micros for sure! In this particular case if you're just measuring speed as an open loop transducer the sampling rate need not be very high in any case since the speed is constant. If it's with a control loop though that's the problem though we don't need to know the exact speed to feed it back (only a signal proportional to speed) so a display isn't that necessary anyway. The problem with displaying only say 1 10th reading might be that the sampling rate must be uniform and no glitches even now and then for a display. I think National instruments had the best solution (though expensive) with they FPGA and real time processor design (Rio). It had a RTOS of course which is a better solution. All sorts of tricks like direct memory access, shared memory, FIFOs etc to speed things up. Certainly state machines were also on the list. For most hobbyists though speed isn't a major issue with micros as they are on the whole just switching things and much speed control is open loop. I think you need to start your own tutorials on micros online John since you have at least 30 years of design experience.
@johnsim3722
@johnsim3722 6 ай бұрын
@@TJMoir I did apply for a job teaching microcontrollers at Paisley Uni, but they took on a less experienced guy instead.
@TJMoir
@TJMoir 6 ай бұрын
Code is here ----------------------------------------------------------------------------------------------------------------------------- //Deconvolution filter to get rotational speed from rotational digital position //Adafruit SSD1306 0.96-inch 128×64 I2C OLED display to show speed gives bandwidth of 16Hz only volatile int counter = 0; //Quadrature encoder: change these numbers as required #define outputA 35 #define outputB 32 // For Display #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for SSD1306 display connected using I2C #define OLED_RESET -1 // Reset pin #define SCREEN_ADDRESS 0x3C Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); /* Vcc is 3.3v SCL is pin 22 SDA is pin 21 Also needs ground pin */ // for sampling freq measurement on scope int sample_pin = 27; float d1, b0, b1, z0, z1, u0, u1, yout; // d is spectral factor coefficient from polynomial void IRAM_ATTR isr_quadencoder() { // quadrature encoder if (digitalRead(outputA) == digitalRead(outputB)) { //Clockwise counter++; } else { //Counter Clockwise counter--; } } boolean running = false; void setup() { d1 = -0.0839; b0 = 0.8392; b1 = -b0; z0 = 0.0; z1 = 0.0; u0 = 0.0; u1 = 0.0; // Serial port for debugging purposes Serial.begin(115200); // initialize the OLED object if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) { Serial.println(F("SSD1306 allocation failed")); for(;;); // Don't proceed, loop forever } // Clear the display buffer. display.clearDisplay(); pinMode(outputA, INPUT); //Encoder input A pinMode(outputB, INPUT); //Encoder input B pinMode(sample_pin, OUTPUT); //Sampling freq measure with scope attachInterrupt(outputA, isr_quadencoder, FALLING); // end setup procedure } //while loop void loop() { // Deconvolution filter z1 = z0; u1 = u0; u0 = counter; //z0=0.0839*z1+0.8392*u0-0.8392*u1; z0 = -d1 * z1 + b0 * u0 + b1 * u1; yout = 100 * z0; /* Serial.print(6000); Serial.print(", "); Serial.print(-6000); Serial.print(", "); Serial.println(yout); */ // Display display.setTextColor(WHITE); // text display.setCursor(0,0); display.setTextSize(2); display.println("Speed(RPM)"); display.setTextSize(3); display.setCursor(0,30); display.println(int(yout)); display.display(); display.clearDisplay(); // Need a time delay delay(4); digitalWrite(sample_pin, running); running = !running; // end of while loop } ---------------------------------------------------------------------------------------------------------------------------------
@Prasad-qj5ml
@Prasad-qj5ml 6 ай бұрын
I mean controller frequency as how many times the control algorithm runs every second. (As the controller is a discrete time domain controller)
@TJMoir
@TJMoir 6 ай бұрын
You mean the sampling frequency - yes I think that was 10kHz too. But it could have been much lower if I had wanted to - that was a bit of an overkill.
@user-io4sr7vg1v
@user-io4sr7vg1v 6 ай бұрын
I don't really understand how you get that particular set of F and G matrices simply by going from continuous to the discrete time. If you could provide or link me to an explanation it would be greatly appreciated.
@TJMoir
@TJMoir 6 ай бұрын
Well the F matrix is the easiest one since F =exp(AT) where T is sampling interval. If you know A =[0 1; 0 0] then you can either use Laplace or expand in a power series F=I+AT+...and the higher terms vanish. For the Delta matrix that is a similar computation which is covered in most textbooks on control which do state space. It's in my book Feedback published by Springer Nature. By Tom Moir. This link has it too by somebody else. extension://ngphehpfehdmjellohmlojkplilekadg/pages/pdf/web/viewer.html?file=https%3A%2F%2Feceweb1.rutgers.edu%2F~gajic%2Fsolmanual%2Fslides%2Fchapter8_DIS.pdf
@johnsim3722
@johnsim3722 6 ай бұрын
The scope I use is a Tektronix TDS5104 and I've got to say it is rather good. Lots of automatic measurements, and it's quick too. Had one guy in the BEng year stealing parts off my project and even took my oscilloscope! He's struggling to get his working and rather than asking for help swapped it over with mine when I went for lunch. I had it working within ten seconds of returning so just carried on with what I was doing.
@dreambigedge4139
@dreambigedge4139 7 ай бұрын
Really great video, cam I get the code plz?
@TJMoir
@TJMoir 7 ай бұрын
// Basic demo for accelerometer readings from Adafruit MPU6050 //Kalman filter added by T.J.Moir 8/5/2021 and angle calculation // ESP32 Guide: RandomNerdTutorials.com/esp32-mpu-6050-accelerometer-gyroscope-arduino/ // ESP8266 Guide: RandomNerdTutorials.com/esp8266-nodemcu-mpu-6050-accelerometer-gyroscope-arduino/ // Arduino Guide: RandomNerdTutorials.com/arduino-mpu-6050-accelerometer-gyroscope/ #include <Adafruit_MPU6050.h> #include <Adafruit_Sensor.h> #include <Wire.h> float angX,angY,dangZ1,dangZ2,dangZ3,angZ; //Kalman filter data float f11,f12,f21,f22,fc11,fc12,fc21,fc22; float d11,d12,d21,d22; //states float xh1k,xh2k,xh1k_1,xh2k_1; float s1,s2; //observations, angular position and angular velocity from accelerometer angles and gyro info //H matrix is identity //Filter gain matrix float k11,k12,k21,k22; //sampling freq and interval float fs,Ts; // for sampling freq int sample_pin=16; boolean running = false; Adafruit_MPU6050 mpu; void setup(void) { pinMode(sample_pin,OUTPUT); sample_pin=false; /////////////////////////// //sampling frequency fs=10000.0; //sampling interval Ts=1/fs; f11=1; f12=-Ts; f21=0.0; f22=1.0; d11=Ts; d12=-Ts*Ts*0.5; d21=0.0; d22=Ts; //Kalman gains have been calculated offline for Q=I,R=I*1e-5; k11=0.0311; k12=-5.1556e-5; k21=-4.8444e-5; k22=0.0311; // //initialise state estimates xh1k=0.0; xh2k=0.0; xh1k_1=0.0; xh2k_1=0.0; /////// //calculate Kalman filter Fc closed loop F matrix. Note H=I identity matrix Fc=F-KH (K has been found offline) fc11=f11-k11; fc12=f12-k12; fc21=f21-k21; fc22=f22=k22; ///// Serial.begin(115200); while (!Serial) //delay(10); // will pause Zero, Leonardo, etc until serial console opens //Serial.println("Adafruit MPU6050 test!"); // Try to initialize! if (!mpu.begin()) { //Serial.println("Failed to find MPU6050 chip"); while (1) { delay(10); } } //Serial.println("MPU6050 Found!"); mpu.setAccelerometerRange(MPU6050_RANGE_8_G); //Serial.print("Accelerometer range set to: "); switch (mpu.getAccelerometerRange()) { case MPU6050_RANGE_2_G: // Serial.println("+-2G"); break; case MPU6050_RANGE_4_G: //Serial.println("+-4G"); break; case MPU6050_RANGE_8_G: //Serial.println("+-8G"); break; case MPU6050_RANGE_16_G: //Serial.println("+-16G"); break; } mpu.setGyroRange(MPU6050_RANGE_500_DEG); //Serial.print("Gyro range set to: "); switch (mpu.getGyroRange()) { case MPU6050_RANGE_250_DEG: //Serial.println("+- 250 deg/s"); break; case MPU6050_RANGE_500_DEG: // Serial.println("+- 500 deg/s"); break; case MPU6050_RANGE_1000_DEG: //Serial.println("+- 1000 deg/s"); break; case MPU6050_RANGE_2000_DEG: //Serial.println("+- 2000 deg/s"); break; } mpu.setFilterBandwidth(MPU6050_BAND_5_HZ); //Serial.print("Filter bandwidth set to: "); switch (mpu.getFilterBandwidth()) { case MPU6050_BAND_260_HZ: //Serial.println("260 Hz"); break; case MPU6050_BAND_184_HZ: //Serial.println("184 Hz"); break; case MPU6050_BAND_94_HZ: //Serial.println("94 Hz"); break; case MPU6050_BAND_44_HZ: //Serial.println("44 Hz"); break; case MPU6050_BAND_21_HZ: //Serial.println("21 Hz"); break; case MPU6050_BAND_10_HZ: //Serial.println("10 Hz"); break; case MPU6050_BAND_5_HZ: //Serial.println("5 Hz"); break; } //Serial.println(""); delay(100); } void loop() { /* Get new sensor events with the readings */ sensors_event_t a, g, temp; mpu.getEvent(&a, &g, &temp); /* Print out the values */ /* Serial.print("Acceleration X: "); Serial.print(a.acceleration.x); Serial.print(", Y: "); Serial.print(a.acceleration.y); Serial.print(", Z: "); Serial.print(a.acceleration.z); Serial.println(" m/s^2");*/ //dangZ1=sqrt(a.acceleration.z*a.acceleration.z+a.acceleration.x*a.acceleration.x); dangZ2=sqrt(a.acceleration.z*a.acceleration.z+a.acceleration.y*a.acceleration.y); //dangZ3=sqrt(a.acceleration.x*a.acceleration.x+a.acceleration.y*a.acceleration.y); //angX=57.29*atan2(a.acceleration.y,dangZ1); //Serial.println(angX); //roll angY=57.29*atan2(a.acceleration.x,dangZ2); // Serial.println(angY); //pitch angle in degrees only //angZ=57.29*atan2(a.acceleration.z,dangZ3); //Serial.println(angZ); //Pitch wrt 90 degrees //Kalman filter here s1= angY; //angular position from accelerometer calculation s2=g.gyro.y;//from gyro angular velocity //shuffle regressors of the states xh1k_1=xh1k; xh2k_1=xh2k; xh1k=fc11*xh1k_1 +fc12*xh2k_1+k11*s1+k12*s2; xh2k=fc21*xh1k_1 +fc22*xh2k_1+k21*s1+k22*s2; /* Serial.print("\t"); Serial.print(s1); //noisy angle estimate of pitch Serial.print(" "); */ Serial.println(xh1k); //KF pitch angle estimate // Serial.println(xh2k); //KF pitch angular velocity estimate // Sets a flag at a precise time. ////// // To measure the sample rate from pin 21 digitalWrite(sample_pin,running); running=!running; /* Serial.print("Rotation X: "); Serial.print(g.gyro.x); Serial.print(", Y: "); Serial.print(g.gyro.y); Serial.print(", Z: "); Serial.print(g.gyro.z); Serial.println(" rad/s"); Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.println(" degC"); Serial.println(""); */ //delay(5); }
@yes-man1112
@yes-man1112 4 ай бұрын
Professor, Thanks very much, very useful and much interesting than my university professor
@johnsim3722
@johnsim3722 7 ай бұрын
I'm going to have to try this next time I come up with daft little lyrics! As I have no musical talents at all this could help me get to No.1 in the charts. I'd be in good company with the others topping them...
@DRAMBgo
@DRAMBgo 8 ай бұрын
Thank you for posting this content, very useful and explicative
@derekhatfield8699
@derekhatfield8699 8 ай бұрын
Superb thank you a proper rag chew explanation. Derek In Dudley
@grumpyfishes
@grumpyfishes 8 ай бұрын
When I attended Chesterfield HiFi show 1994, I picked up a promotional leaflet/brochure for Contour Bias, it featured his modified Akai 4000D machine which he used to devlope or possibly demonstate the system. Unfortunately the brochure got lost!
@TJMoir
@TJMoir 8 ай бұрын
That's interesting. I don't recall us having an Akai, I remember the Marantz Archie modified after he had done the reel to reel one. People didn't believe the principle to begin with but to prove it it was quite simple with the spectrum analyser and two heads. It's a long time ago of course and eventually we dumped the idea at Ampsys to concentrate on the Amplitude Locked loop. I wasn't at that show btw, probably Archie and another colleague. The biggest problem was getting it to work I think 20 times real time.
@grumpyfishes
@grumpyfishes 8 ай бұрын
@@TJMoir As you say, it's a long time ago and memory plays tricks so it could have been a similar make/model, just that Akai stuck in my mind. I don't recall any demos of the system at that show, I was fascinated with tape recorders at the time so I'm sure I would have remembered that. I read that the major companies who appraised the idea didn't take it up because it wasn't compatible with the existing technology and were concentrating on making CDs.
@TJMoir
@TJMoir 8 ай бұрын
On recording it was a different method that required a modification, something not too difficult really but playback could be done on any tape player. We would have the tapes in our cars for instance. They had enormous amount of treble that was missing before and couldn't make out any hiss from the tape at all. Archie had a saying, on cassette tapes the treble is either "hissing or missing"! He was referring to ac bias and Dolby which rarely if ever appeared to work properly but people would turn it on and it would act like a low pass filter.
@johnsim3722
@johnsim3722 8 ай бұрын
@@grumpyfishes I was a student at Paisley Uni and knew Archie there. I was in awe of what he was doing with Amplitude Locked Loop because it worked brilliantly. I'm one of the few people he trusted with a tape done on the system, perhaps one of the earlier ones when he got the system to work playing back on any cassette deck. Certainly don't recall him giving away recordings (although I did supply the cassette!). How does it compare with CDs? One demo he set up for me was the ability to switch between the CD source and recording on tape. One of Queen's albums was used that had excellent production values. You could switch easily by the press of a button and soon you lost track of which position the button was in because both audios sounded exactly the same. Was there hiss or noise? No. It was a clean, pure, signal that you got out of the tape. Even going home with the cassette to play on my own little system the audio was excellent. That would have been a Kenwood UD-7 at the time, a highly rated mini system that essentially was the size it needed to be once the record player was removed. What about Dolby? I always found this to be junk to be honest. You'd record on a tighter version of Dolby and playback on the older version to get it close to what it was supposed to do. The contour biased tape recording was far superior to any Dolby recording I've ever heard on tape. Take the hiss, the noise, that you still get on Dolby, and remove it. Then still keep the bandwidth of the original audio so that you still hear all the detail, all the highest frequencies. That's the difference with Counter Biasing.
@pbelb
@pbelb 9 ай бұрын
nice introduction, but, this video would be *waaaaay* more helpful if you share a link where more information can be looked at.
@TJMoir
@TJMoir 9 ай бұрын
I'm afraid it's a bit like buying a new kettle or washing machine, they don't provide much in the way of how it's made, only 1 sheet of paper. There is a spec of course and I have made a new video showing the theory of how you demodulate AM and FM on a micro ie software receiver. There is an open source universal software radio receiver however which you can look at. Also GNU Radio. en.wikipedia.org/wiki/Universal_Software_Radio_Peripheral#:~:text=The%20USRP%20family%20was%20designed,free%20and%20open%20source%20software.
@pbelb
@pbelb 9 ай бұрын
Hey​@@TJMoir , Perhaps your comment is really for @johnsim3722? I really wasn't talking about how it's made, but rather, a web URL link so that people that might be interested in getting their own can know of some places where they can find them, and from there, can possibly find out more about them. This specific product (or the original on which it's based), for example. Not generic how SDR works. You provided a nice review, but, you have not shared a way for others to find out about the product themselves!
@TJMoir
@TJMoir 9 ай бұрын
@@pbelb sure thing www.banggood.com/4_3-inch-Software-Defined-Radio-SDR-Radio-Receiver-100K-149MHz-Digital-Demodulation-Short-Wave-FM-MW-SSB-CW-HAM-DSP-Receiver-p-1985013.html?gmcCountry=NZ&currency=NZD&cur_warehouse=CN&createTmp=1&PLA-NZ-ALL-BGfeedcom-2204011-massa&ad_id=592464367633&gclid=Cj0KCQjwsp6pBhCfARIsAD3GZuYrf9kS-4bQN4LN_YqX_c1ibxuE8OI16w1fHb-TBQRVXqbkWyhagI8aAj5SEALw_wcB
@TJMoir
@TJMoir 9 ай бұрын
@@pbelb Link is shown. I don't always like putting the price etc since it looks like I am selling it or promoting it which I am not. It's just more engineering interest. But the link is below for info. Cheers. There are a great many other types which are similar, some better than others. This one is a clone which means I can't connect to a PC as far as I know.
@johnsim3722
@johnsim3722 9 ай бұрын
Are they doing a step down in the frequency first before an ADC?
@TJMoir
@TJMoir 9 ай бұрын
I just did another video explaining most of this. But it can get quite complicated so I tried to make it as simple as possible to illustrate the basic concept behind I/Q demodulation. Nowadays you can sample at incredible rates but yes you need to down sample before the processor can handle it.
@dtk7728
@dtk7728 9 ай бұрын
Normal HR is 60 to 100, below 60 is bradycardia and over 100 is tachy
@johnsim3722
@johnsim3722 10 ай бұрын
It's using a lot of stock imagery to make the video, still images from various sources and only some related to the topic. And it looked that the inventor was a young man sitting in front of his computer. This is the danger of misrepresentation that I took up with the IET continuously using stock images rather than using genuine images of engineers or IET members within all their publications. Alas, the point was lost on the IET and they thought I was a photographer upset they'd not used my photos or something! Not the case at all, just a member wondering what he was paying his fees for. But if you weren't an engineer and just viewing this video you'd be mighty impressed just how polished it is, and wondering why everything doesn't use the Kalman filter. It could easily progress to producing "How It's Made" TV shows.
@robinhankin6514
@robinhankin6514 11 ай бұрын
very impressive, I will try the same thing in R and let you know how it gets on - Robin
@TJMoir
@TJMoir 11 ай бұрын
I sent you the conversion to R just this minute by email . I don't have an R compiler but it would be interesting to see if it gets it right first time. I doubt it.
@johnsim3722
@johnsim3722 Жыл бұрын
Firstly, it's kind of strange watching this on my Mac and seeing a Windows desktop! It's doing a good job of converting from one format to another and that can be difficult, and I guess I'll have to do this myself and learn SWIFT to continue with iPhone programming. I dread that for the amount of work I put in to the original apps, and then to convert to a language I don't quite understand yet (not having tried to learn it as yet). What I think people fear will happen is how they placed it out on Star Trek The Next Generation where they'd ask the computer to create a program which did XYZ. There's a big leap there, where the system has to firstly figure out the problem, secondly an implementation in whatever language, be it maths alone, and then create something which fits within the choose programming language framework. There's still an innovation step to go through where someone is creating the basic concept before it is written in to code by the AI. I think that's the most important takeaway from this demonstration.
@TJMoir
@TJMoir Жыл бұрын
Well in this case I did a translation but it does work from scratch too. I must have a go at something to show.
@TJMoir
@TJMoir Жыл бұрын
Watch my new video - coming up, where I get it do write an app to do a calculator from scratch
@johnsim3722
@johnsim3722 Жыл бұрын
@@TJMoir Looking forward to seeing that video. It is impressive what it can do, just when you see that it is lifting artist's work and creating something new from that base source, is it imitating or is that creation? Is it more a very expert expert system, or genuine new intellectual property? But then at the same time, isn't that what we also do as we've read the text books and learned how to program or solve equations?
@TJMoir
@TJMoir 11 ай бұрын
@@johnsim3722 what you have to watch is that everything it created I think it remembers too. don't piss it off John Connor
@johnsim3722
@johnsim3722 Жыл бұрын
Very impressed how quick and smooth the platform is held. Really great project work.
@TJMoir
@TJMoir Жыл бұрын
that's the Kalman filter doing it's job. They had them in Apollo flights to the moon, some of the first applications. Used for inertial navigation I think.
@EmmanuelOga
@EmmanuelOga Жыл бұрын
Thanks! At this speed difference is not a big deal since the difference in performance is huge, but usually you would like to run your loops a few thousand times and calculate average, min, max, and std dev of the full runs for a more detailed comparison.
@johnsim3722
@johnsim3722 Жыл бұрын
I don't know about that one... Maybe it would work better if it were working with MIDI files where it could see the raw score?
@johnsim3722
@johnsim3722 Жыл бұрын
Robbie's voice has massive amounts of reverb added to it. That's why I can still hear something in the music only track where the voice has been extracted. That said, the extraction is very impressive. I've known DJs to do something similar just to get certain beats or noises out of a song, but not how they do this. Changing the voice is powerful because you could get someone who's a good imitator with the inflections that someone has, and running it through such a system you're ending up with a performance you may not be able to tell from the original artist. This takes your famous Paisley demonstration of "I'm definitely not guilty" to a whole new level.
@TJMoir
@TJMoir Жыл бұрын
Yes and that could be an issue with the machine learning too.
@mistygill8469
@mistygill8469 Жыл бұрын
🔥 *Promo sm*
@muhamadzainimansur9624
@muhamadzainimansur9624 Жыл бұрын
please share the link where you bought
@johnsim3722
@johnsim3722 Жыл бұрын
I'm guessing that was Chris Chitty saying "I don't really care"? Quite some encouragement... Rather strange looking robot!
@johnsim3722
@johnsim3722 Жыл бұрын
Much of what you originally did with the smart home research has now been adopted by by Siri and Alexa. You demonstrated the technology working before it was used commercially by Apple and Googole. Now, those with smart lightbulbs can use them to switch them on and off, I can control the heating in my house with them. Also telling my iPhone what I'd want to watch. The problem with music is it doesn't quite understand some group's names or their track names. Still, you have given the smart assistant a bit of a personality. A visual image which users would relate to better.
@johnsim3722
@johnsim3722 Жыл бұрын
Would make a great fart detector. Nobody could hide then!
@RMSoundaryaV
@RMSoundaryaV Жыл бұрын
What are the components required to do this project
@johnsim3722
@johnsim3722 Жыл бұрын
Maths is a language we can share information with all over the world. You're right, it's a way to communicate. The problem stems from the ------ we use to write equations on paper not having an inline equivalent. We use ÷ when writing as that's what we're taught in schools, but on my Lenovo keyboard that symbol has been replaced by a /. Definitely an engineer laid out that keyboard! What is the problem with ÷ or /? The problem is parenthesis of the equation when moving from ------ to /. When using ------ you clearly can see what is the nominator and denominator. That may be a number, or a more complex equation in itself. When moving to a slash notation you should put both nominator and denominator within parenthesis. Except for when it's a single digit, where there's no ambiguity. 6÷2(1+2) then becomes 6/(2(1+2)). With an update to the divide symbol to one which would be understood by computer languages too. When calculating this out there's no ambiguity, the answer is 1. Parenthesis is the key to ensuring the translation from mathematical notion to written text keeps the context and integrity of the equation. To ensure that it isn't misread. It also means that when writing the equation in to a computer language you get the expected result, and not an incorrect interpretation. Or rather, translation.
@TJMoir
@TJMoir Жыл бұрын
I lost count of the times I have explained this to teachers on maths groups in Facebook! Of course use brackets. Their reply is always the same before banning me from the group. They say brackets are not required and that there is only one possible answer! I show them the Harvard page on it but they say it is wrong! It is like flat earth believers. It's like this, as an engineer you either follow others formulae or define your own for your own purposes or for others. Because of that it means other must read it and it must not be ambiguous in any way. For teachers, they are looking for problems for pupils to solve and they tell me if they put the brackets in then it's too easy! To which I answer, who said it should be difficult? Why should it be difficult? for most of us engineers or academics of course it goes un noticed because we write safely using brackets or in fractional form. It is something that is not an issue at all. Only when writing software of course, then you must take care. It is disturbing however in as much that it puts children off basic arithmetic and gives false impressions of how we use basic algebra.
@johnsim3722
@johnsim3722 Жыл бұрын
@@TJMoir That's sad that teachers can't see why they're teaching incorrectly and worse, ban those who point out the correct way from a fellow professional teacher! I feel one way around this would be to write out the equation in fractional form and ask them to rewrite it with the division symbol, as written in this video. Then to work out the value each of those formulas return. At that point they have no option but to explain why they get a different result. It's certainly an issue when writing software as you easily get a different result from what you expect. Going back to my first desktop publisher (Impression) on the Archimedes, you needed to buy extra software to be able to write equations. That was just for documentation. Doesn't applications like MatLab convert equations in to C code? Would be interesting to see who it writes out that equation too!
@TJMoir
@TJMoir Жыл бұрын
@@johnsim3722 Problem with that is that it affects more primary schools than secondary (I think) and primary school kids (or grade school I think they call them in the USA) won't have studied fractions at the early stage. But that is no excuse for adults of course. The left to right thing is more of a rough agreement, it is not axiomatic to algebra. If it were it gives problems such as if y=1/2x then this would be x/2! Clearly that would not be intended. So to have a rough convention is ok but to say it is the only way is wrong.
@johnsim3722
@johnsim3722 Жыл бұрын
@@TJMoir That's a very good point and I think it still comes down to a translation problem from maths to written notation; something that could be put in a line of text in a word processor. Using your example if we're writing in maths we'd perhaps say: y=½*x when we'd want the answer to be x/2. (Assuming that the symbol for a half came through - it might not.) But now I have a problem. If I want the answer to be 1 divided by 2x and to write it in this text box I know the formatting is going to be changed from what I see to what you see. 1 y=_____ 2x What I've written might have survived KZbin text filtering for the most part, but not all systems are the same. But written like this it also wouldn't work with any programming language. Left to right calculating of a written formula does seem good practice and it is how a computer would work through a problem. Maybe that is reason enough to use this method? But at the same time, we need to ensure parenthesis to remove ambiguity of the equation.
@AsifAli-qd6qw
@AsifAli-qd6qw Жыл бұрын
Can u send me the mail id of this person .I want to join for this in india
@AncapistanVan
@AncapistanVan Жыл бұрын
Very cool. Have you seen the Ascend 2 wheeled robot? Can you make that concept into a wheelchair for amputees? My buddy was born with no arms or legs and I've been telling him this isn't even his final form. With current tech he could have self balancing legs with wheels and arms. Pls help make my friend into a robo man.
@mubaraksharief3807
@mubaraksharief3807 Жыл бұрын
Can you give her number i had some doubt in this...i too have the same project without carbon microphone I'm going to use chest piece of stethoscope
@TJMoir
@TJMoir Жыл бұрын
I don't even know if she still lives in NZ.
@hoytvolker3
@hoytvolker3 Жыл бұрын
Seems like life will become 10 times easier with these types of AI bots, even learning would get accelerated. I can see great potential in learning from such bot as It has nicely written explanation for concepts..
@TJMoir
@TJMoir Жыл бұрын
Yes and this is the positive way of looking at such things rather than thinking of it as a cheat tool.