Paul Sutton

Personal Blog

Code Club Electronics 13

So further to my previous attempt, I have now made some progress with this. New code is as follows

// the setup function runs once when you press reset or power the board

float floatMap(float x, float in_min, float in_max, float out_min, float out_max) {
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
const int buzzer = 5;


void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(buzzer, OUTPUT);
}


  

// the loop function runs over and over again forever
void loop() {
  // read the input on analog pin A0:
  int analogValue = analogRead(A0);
  // Rescale to potentiometer's voltage (from 0V to 5V):
  float voltage = floatMap(analogValue, 0, 1023, 0, 5);
  tone(buzzer, (voltage));   // 1khz tone to buzzer
  delay(analogValue);                       // wait for time period linked to pot input value
  tone(buzzer, (voltage));    // 1khz tone to buzzer

  //https://www.instructables.com/How-to-use-a-Buzzer-Arduino-Tutorial/
}

The main difference here is that I am binding the buzzer tone to the voltage

  float voltage = floatMap(analogValue, 0, 1023, 0, 5);
  tone(buzzer, (voltage));   // 1khz tone to buzzer
  delay(analogValue);                       // wait for time period linked to pot input value
  tone(buzzer, (voltage));    // 1khz tone to buzzer

This sort of works, but the frequency isn't very high.

Tags

#Arduino,#Electronics


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

PG Science books

Physics

People

Physics books

Maths

Libretexts

Open Stax

Tags

#Books,#Science,#ProjectGutenberg,#Maths,#Chemistry,#Physics


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

EdX LaTeX course

I have signed up to the LaTeX course IITBombayX: LaTeX for Students, Engineers, and Scientists [1] on the EdX website [2]. I have provided a link to university of Bombay for reference [3]

Looking at the course learning outcomes, I seem to know quite a lot already, however I need to improve how I organise and layout documents.

A while back I undertook an experiment on Acidity of Seawater and how this can be changed with eggshells. I want to go back to the write-up and make it look a much more professional, which I should be able to do with the help of this course.

Post for here

References

  1. IITBombayX: LaTeX for Students, Engineers, and Scientists
  2. EdX
  3. IITBombayX

Tags

#Course,#LaTeX,#Writing,#Learning


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

2023 Nobel Prize : Chemistry

The 2023 Nobel Priize for Chemistry was awarded for Quantum Dots. The info graphic is below. While not an academic source of information, there is an article on WikiPedia about this.

Quantum dots are semiconductor nanocrystals are semiconductor particles a few nanometres [1]. So there is some real potential here to make smaller circuits etc I guess. I have also linked to arXiv that has several papers on this topic [2].

2023 chemistry Nobel Prize

References

  1. Quantum Dots on WikiPedia
  2. Papers on arXiv

Tags

#Science,#Nobel,#QuamtumDots


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

console / terminal xmas tree

Nice shell script to make a colour Christmas tree on your terminal / console

xmas tree in console

#christmas,#shell,#coding,#hacking,#draw,#xmas,#tree, #xmastree,#bash,#scaleway,#animation

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

LibrePlanet 2024

We now have more details of the 2024 LibrePlanet conference, presented by the Free Software Foundation.

Poster

More details will be available in due course.

Links

Tags

#FreeSoftware,#fsf,#Conference,#Event


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

ESA – Innovative X-ray lobster-eye mission set to launch 2024

Einstein Mission Image embedded from website below

The next generation of X-ray probe will launch in January 2024. This mission will help us discover more x-ray sources and much more.

Tags

#ESA,#Space,#Science,#Mission,#Einstein,#X-ray,#Probe


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

NFL 2023 week 16

NFL week 9 fixtures can be found here

Links

Tags

#Football,#NFL,#Week16


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

Light sails

Interstellar travel could be getting closer. This paper (or at least a link to it) was posted on to the Fediverse.

Broadband, High-Reflectivity Dielectric Mirrors at Wafer Scale: Combining Photonic Crystal and Metasurface Architectures for Advanced Light sails

Sounds promising and at present does seem smaller spacecraft can be moved in this way, but it is a start. Good possibilities for future research and use.

I will download and read this paper later.

Tags

#Paper.#arXiv,#Optics,#Space,#propulsion,#light


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay

TeX Live 2023

TeX Live 2023 is should now be available. This is the latest release of the popular LaTeX typesetting system, software, related software, packages, documentation and other related materials and components.

Please give it a day or so, so that mirrors can be populated etc.

Writing

Tags

#TeXLive,#LaTeX,#Release,#Writing,#CTAN


Mastodon ShellLabs Join Mastodon
AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay