Friday, 28 April 2017
Functions - Arduino
Tuesday, 25 April 2017
Known Space - Part 4 - Faster-Than-Light (2651 AD and later)
[2650-2652] Fleet of Worlds- Set 200 years before the discovery of Ringworld
The Fleet of World series consists of five books by the same authors:
- Fleet of Worlds (2007)
- Juggler of Worlds (2008),
- Destroyer of Worlds (2009)
- Betrayer of Worlds (2010) and
- Fate of Worlds: Return from the Ringworld (2012).
[2658] Ghost (Crashlander)
Novelette
[2658] Betrayed (JoW)
Juggler of Worlds is the second book in the Fleet of Worlds series which is intended to serve as a prequel to Ringworld.
- [2658 AD] Fly By Night (MKW 9)
[2658 AD] The Soft Weapon (Neutron Star)
- [2658-2660 C.E.] The Outsiders-Epilogue (JoW)
[2675 AD] Destroyer of Worlds
Destroyer of Worlds is the third book in the Fleet of Worlds series which is intended to serve as a prequel to Ringworld.
It is set ten years after Juggler of Worlds, drawing heavily from Protector
[2780-2781 AD] Betrayer of Worlds
- [2686 C.E.] The Color of Sunfire (LarryNiven.net)
http://www.larryniven.net/stories/color_of_sunfire.shtml
[2830 AD.] There Is A Tide (TKS)
[2850-2851 AD.] Ringworld
***
[2871-2881 AD.] The Ringworld Engineers
[2882-2893 AD.] The Ringworld Throne
- [2892 C.E.] Peter Robinson (MKW10)
[2893 AD.] Ringworld’s Children
- [2893-2894 AD.] Fate of Worlds: Return from the Ringworld
- [2895 AD] String (MKW12)
- [2899 AD] The Hunting Park (MKW 11)
- [2965 AD.] Peace and Freedom (MKW12)]
[3101 AD.] Safe at Any Speed (TKS)
First published in the Magazine of fantasy and science fiction may 1967
You can also find this in Larry Niven's "Tales of Known Space".
- The Adults (short story)
- ARM (short story)
- At The Bottom Of A Hole (short story)
- At The Core (short story)
- Becalmed In Hell (short story)
- The Borderland Of Sol (short story)
- Choosing Names (short story)
- Cloak Of Anarchy (short story)
- The Coldest Place (short story)
- The Deceivers (short story)
- The Defenseless Dead (short story)
- The Ethics Of Madness (short story)
- Eye Of An Octopus (short story)
- Flatlander (short story)
- Fleet Of Worlds (novel, written in collaboration with Edward M. Lerner)
- Juggler Of Worlds (novel, written in collaboration with Edward M. Lerner)
- Destroyer Of Worlds (novel, written in collaboration with Edward M. Lerner)
- Betrayer Of Worlds (novel, written in collaboration with Edward M. Lerner)
- Fate Of Worlds (novel, written in collaboration with Edward M. Lerner)
- Fly-By-Night (short story)
- Ghost (short story)
- A Gift From Earth (novel)
- Grendel (short story)
- The Handicapped (short story)
- How The Heroes Die (short story)
- The Hunting Park (short story)
- The Jigsaw Man (short story)
- Madness Has Its Place (short story)
- N-Space (anthology)
- Neutron Star (short story)
- The Organleggers (short story)
- The Patchwork Girl (novel)
- Procrustes (short story)
- Protector (novel)
- A Relic Of The Empire (short story)
- Ring World (novel)
- The Ringworld Engineers (novel)
- The Ringworld Throne (novel)
- Ringworld's Children (novel)
- Safe At Any Speed (short story)
- Slowboat Cargo (short story)
- There Is A Tide (short story)
- The Soft Weapon (short story, adapted into an episode of Star Trek: The Animated Series)
- Wait It Out (short story)
- The Warriors (short story, introduced the Kzin)
- The Woman In Del Rey Crater (short story)
- World Of Ptavvs (novel)
Do let me know is there are any mistakes, errors or omissions.
--------------------------------------------
----------------------------------------------
The coldest Place - Larry Niven
"Helium II. That's all our monsters are."
"Check them for contaminants."
"For what?"
"Contaminants. My body is hydrogen oxide with contaminants. If the contaminants in the helium are complex enough, it might be alive."
"There are plenty of other substances".
- "The Ship Who Sang", The Magazine of Fantasy and Science Fiction, April 1961
- "The Ship Who Mourned", Analog, March 1966
- "The Ship Who Killed", Galaxy Magazine, Oct 1966
- "Dramatic Mission", Analog, Jun 1969
- "The Ship Who Dissembled" (chapter title), published as "The Ship Who Disappeared", If, March 1969
--------------------------------------------
----------------------------------------------Saturday, 22 April 2017
San Franscisco - Alcatraz Island.
San Fran architecture
Friday, 21 April 2017
Serial Monitor - Reading numbers
The arduino will wait till you have entered a value.
This serial monitor is in TinkerCad.
Example 1
// variables
int myNumber;
String msg="Please Enter Your Number:";
String msg2="Your Number is: ";
void setup()
{
Serial.begin(9600);
}
void loop()
{
// 3 things we do: ask wait read
Serial.println(msg); //ask
while (Serial.available()==0){
// while there is no data
//on the serial loop do nothing ..wait
}
//read
myNumber=Serial.parseInt();
Serial.print(msg2);
Serial.println(myNumber);
}
-----------------------------------------------------
// variables
int numBlinks;
String msg="How many blinks do you want?:";
int j;
int bt=100;
int redPin=12;
void setup()
{
Serial.begin(9600);
pinMode(redPin,OUTPUT);
}
void loop()
{
// 3 things we do: ask wait read
Serial.println(msg); //ask
while (Serial.available()==0){
// while there is no data
//on the serial loop do nothing ..wait
}
//read
numBlinks=Serial.parseInt();
for (j=1;j<=numBlinks;j=j+1){
digitalWrite(redPin,HIGH);
delay(bt);
digitalWrite(redPin,LOW);
delay(bt);
}
}
-----------------------------------------------------------------------------------
// variables
String msg="What is the radius of your circle ?:";
float radius;
float area;
String msg2="Your Circle Has an Area of : ";
float pi=3.14;
void setup()
{
Serial.begin(9600);
}
void loop()
{
// 3 things we do: ask wait read
Serial.println(msg); //ask
{
while (Serial.available()==0);
// while there is no data
//on the serial loop do nothing ..wait
}
//read
radius=Serial.parseFloat(); // parseFloat not parseInt
area=pi*radius*radius;
Serial.print(msg2);
Serial.println(area);
}
----------------------------------------------
Links
Saturday, 15 April 2017
Adding more steps to the pioneer squid sequence
Increasing track length.for the Toraiz squid
Deluge Effects - Reverb
The Reverb grid Short cuts are
Room size - Room size applied to the whole song
Dampening
Width
Pan - Enables panning to one side or the other.
Amount
1. Press Shift + the pad to activate.
You must be in Clip view.
2. turn (SELECT) to adjust the value.
Room Size
Larger rooms would provide longer delay
range: 0-50.
Dampening
emulates things like curtains, furniture, people -- things that absorb the sounds
Adds warmth and reduces high frequencies.
Width
Sets the spread of the reverb to give stereo effects
range: 0-50.
Pan
- Enables panning to one side or the other.
Range is 32L-0-32R.
Amount
This Sets the amount of signal sent to the reverb.
The sound can come from a synth or a sample or kit.
range: 0-50.
Side
Reverb has a specific side chain compressor
You can only access this via the select menu knob.
1. clip view
2. Press select knob
3. Navigate to the FX section and press (SELECT).
4. Navigate to the ‘rEVE’ section and press (SELECT).
5. Select ‘SidE’ - sidechain. Press (SELECT)
6. Select ‘VoLU’ - volume level. Press (SELECT)
options : 0 - 50 & AUTO
AUTO takes its parameters from the sidechain compressor of the
sound with the highest reverb.
-------------------------------------------------------
You can also use the gold knobs to effect the reverb
1. Ensure in clip view for a kit, synth.
2. Press [SIDECHAIN / REVERB] affect button. Button illuminates orange.
3. Turn (LOWER) to change reverb amount.
Sunday, 9 April 2017
Monday, 3 April 2017
Complier directives - Arduino
#warning
Sunday, 2 April 2017
i2c LCD display with rotary encoder 1
// o CLK (out B) --> Pin 2
// o DT (Out A) --> Pin 3
// o SW --> Pin 4
// o GND --> Pin 6 & GND on arduino
// LCDRotaryTest16x2.ino - Test Program for Character LCD with I2C and KY-040 Rotary Encoder
// Author: John Miller
// Revision: 1.0.1
// Date: 5/25/2020
// Project Source: https://github.com/jpsrmiller/rotary-encoder-i2c-lcd
//
// This Arduino program provides an example for using a KY-040 Rotary Encoder and
// a 16x2 or 20x4 Character LCD with I2C interface
//
// The program may be freely copied, modified, and used for any Arduino projects
//
// The KY-040 Rotary Encoder is connected to the following Arduino Uno pins
// o CLK --> Pin 2
// o DT --> Pin 3
// o SW --> Pin 4
// o + --> Pin 5
// o GND --> Pin 6
//
// The LCD is connected to the following Arduino Uno pins
// o GND --> GND
// o VCC --> 5V
// o SDA --> Pin A4 (SDA)
// o SCL --> Pin A5 (SCL)
//
// The Rotary Encoder uses Arduino pins for the GND and +5V so that the remaining
// 5V and GND pins on the Arduino Uno can be used for other peripheral devices
// This works because the the Rotary Encoder draws less than the 40 mA
// maximum current allowed on the Arduino Uno I/O pins
//
// *** External Libraries Required ***
// The following libraries must be downloaded and copied into the Arduino "libraries"
// folder in order for the program to compile:
// o OneButton - https://github.com/mathertel/OneButton
// o LiquidCrystal_I2C - https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
//
// *********************************************************************************
#include <Arduino.h>
#include <Wire.h>
#include <OneButton.h>
#include <LiquidCrystal_I2C.h>
// Define the IO Pins Used
#define PIN_ROTARY_CLK 2 // Used for generating interrupts using CLK signal
#define PIN_ROTARY_DAT 3 // Used for reading DT signal
#define PIN_ROTARY_SW 4 // Used for the Rotary push button switch
#define PIN_ROTARY_5V 5 // Set to HIGH to be the 5V pin for the Rotary Encoder
#define PIN_ROTARY_GND 6 // Set to LOW to be the GND pin for the Rotary Encoder
// Most I2C LCD's have an I2C Address of either 0x27 or 0x3F
// If the LCD doesn't work with one address, try the other
//#define LCD_I2C_ADDRESS 0x27
//#define LCD_I2C_ADDRESS 0x3F
// Define the size of the LCD. Most LCD's are either 16x2 or 20x4
//#define LCD_ROW_COUNT 2 // Number of Rows
//#define LCD_COL_COUNT 16 // Number of Characters per Row
// OneButton class handles Debounce and detects button press
OneButton btnRot(PIN_ROTARY_SW, HIGH); // Rotary Select button
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// LiquidCrystal_I2C lcd(LCD_I2C_ADDRESS, LCD_COL_COUNT, LCD_ROW_COUNT);
// Used for the Rotary Encoder interrupt routines PinA() and PinB()
volatile int rotaryCount = 0;
// Disables the Rotary Encoder interrupts while the LCD is being updated
byte rotaryDisabled;
volatile byte aFlag = 0; // lets us know when we're expecting a rising edge on pinA
// to signal that the encoder has arrived at a detent
volatile byte bFlag = 0; // lets us know when we're expecting a rising edge on pinB
// to signal that the encoder has arrived at a detent
// (opposite direction to when aFlag is set)
volatile byte reading = 0; //somewhere to store the direct values we read from our interrupt
// pins before checking to see if we have moved a whole detent
// ****************************************************************************
// PinA() - Called by the Interrupt pin when the Rotary Encoder Turned
// Routine based on Simon Merrett - Improved Arduino Rotary Encoder Reading
// https://www.instructables.com/id/Improved-Arduino-Rotary-Encoder-Reading/
// ****************************************************************************
void PinA() {
if (rotaryDisabled) return;
cli(); //stop interrupts happening before we read pin values
// read all eight pin values then strip away all but pinA and pinB's values
reading = PIND & 0xC;
//check that both pins at detent (HIGH) and that we are expecting detent on this pin's rising edge
if (reading == B00001100 && aFlag) {
rotaryRight();
bFlag = 0; //reset flags for the next turn
aFlag = 0; //reset flags for the next turn
}
//signal that we're expecting pinB to signal the transition to detent from free rotation
else if (reading == B00000100) bFlag = 1;
sei(); //restart interrupts
}
// ****************************************************************************
// PinB() - Called by the Interrupt pin when the Rotary Encoder Turned
// Routine based on Simon Merrett - Improved Arduino Rotary Encoder Reading
// https://www.instructables.com/id/Improved-Arduino-Rotary-Encoder-Reading/
// ****************************************************************************
void PinB() {
if (rotaryDisabled) return;
cli(); //stop interrupts happening before we read pin values
//read all eight pin values then strip away all but pinA and pinB's values
reading = PIND & 0xC;
//check that both pins at detent (HIGH) and that we are expecting detent on this pin's rising edge
if (reading == B00001100 && bFlag) {
rotaryLeft();
bFlag = 0; //reset flags for the next turn
aFlag = 0; //reset flags for the next turn
}
//signal that we're expecting pinA to signal the transition to detent from free rotation
else if (reading == B00001000) aFlag = 1;
sei(); //restart interrupts
}
// ****************************************************************************
// rotaryRight() - Rotary Encoder is turned 1 detent to the Right (clockwise)
// Insert your own code here.
// ****************************************************************************
void rotaryRight()
{
rotaryCount++;
}
// **********************************************************************************
// rotaryLeft() - Rotary Encoder is turned 1 detent to the Left (counter-clockwise)
// Insert your own code here.
// **********************************************************************************
void rotaryLeft()
{
rotaryCount--;
}
// ****************************************************************************
// rotaryClick() - Rotary Encoder Select Switch is pressed
// Insert your own code here.
// ****************************************************************************
void rotaryClick()
{
rotaryCount += 100;
}
// ****************************************************************************
// rotaryLongPress() - Rotary Encoder Select Switch is Held Down (Long Press)
// Insert your own code here.
// ****************************************************************************
void rotaryLongPress()
{
rotaryCount = 0;
}
// ****************************************************************************
// initializeRotaryEncoder() - Initialize the pins and interrupt functions
// for the Rotary Encoder
// ****************************************************************************
void initializeRotaryEncoder()
{
// Set the Directions of the I/O Pins
pinMode(PIN_ROTARY_CLK, INPUT_PULLUP);
pinMode(PIN_ROTARY_DAT, INPUT_PULLUP);
pinMode(PIN_ROTARY_SW, INPUT_PULLUP);
pinMode(PIN_ROTARY_GND, OUTPUT);
pinMode(PIN_ROTARY_5V, OUTPUT);
// Set the 5V and GND pins for the Rotary Encoder
digitalWrite(PIN_ROTARY_GND, LOW);
digitalWrite(PIN_ROTARY_5V, HIGH);
// set an interrupt on PinA and PinB, looking for a rising edge signal and
// executing the "PinA" and "PinB" Interrupt Service Routines
attachInterrupt(0, PinA, RISING);
attachInterrupt(1, PinB, RISING);
// Define the functions for Rotary Encoder Click and Long Press
btnRot.attachClick(&rotaryClick);
btnRot.attachLongPressStart(&rotaryLongPress);
btnRot.setPressTicks(2000);
rotaryDisabled = 0;
}
// ****************************************************************************
// initializeLcd() - Initialize the LCD
// ****************************************************************************
void initializeLcd()
{
lcd.begin(16,2);
lcd.backlight();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(F("Test LCD & Rotry"));
}
// ****************************************************************************
// updateLcd() - Update the LCD with current Rotary Encoder detent count
// ****************************************************************************
void updateLcd()
{
rotaryDisabled = 1;
lcd.setCursor(0, 1);
lcd.print(F("Count = "));
lcd.print(rotaryCount);
lcd.print(F(" "));
rotaryDisabled = 0;
}
// ****************************************************************************
// setup() - Initialization Function
// ****************************************************************************
void setup()
{
initializeRotaryEncoder();
initializeLcd();
}
// ****************************************************************************
// loop() - Main Program Loop Function
// ****************************************************************************
void loop()
{
updateLcd();
btnRot.tick();
delay(50);
}
Saturday, 1 April 2017
I2C LCD display - arduino
- // --------------------------------------
- // i2c_scanner
- //
- // Version 1
- // This program (or code that looks like it)
- // can be found in many places.
- // For example on the Arduino.cc forum.
- // The original author is not know.
- // Version 2, Juni 2012, Using Arduino 1.0.1
- // Adapted to be as simple as possible by Arduino.cc user Krodal
- // Version 3, Feb 26 2013
- // V3 by louarnold
- // Version 4, March 3, 2013, Using Arduino 1.0.3
- // by Arduino.cc user Krodal.
- // Changes by louarnold removed.
- // Scanning addresses changed from 0...127 to 1...119,
- // according to the i2c scanner by Nick Gammon
- // https://www.gammon.com.au/forum/?id=10896
- // Version 5, March 28, 2013
- // As version 4, but address scans now to 127.
- // A sensor seems to use address 120.
- // Version 6, November 27, 2015.
- // Added waiting for the Leonardo serial communication.
- //
- //
- // This sketch tests the standard 7-bit addresses
- // Devices with higher bit address might not be seen properly.
- //
- #include <Wire.h>
- void setup()
- {
- Wire.begin();
- Serial.begin(9600);
- while (!Serial); // Leonardo: wait for serial monitor
- Serial.println("\nI2C Scanner");
- }
- void loop()
- {
- byte error, address;
- int nDevices;
- Serial.println("Scanning...");
- nDevices = 0;
- for(address = 1; address < 127; address++ )
- {
- // The i2c_scanner uses the return value of
- // the Write.endTransmisstion to see if
- // a device did acknowledge to the address.
- Wire.beginTransmission(address);
- error = Wire.endTransmission();
- if (error == 0)
- {
- Serial.print("I2C device found at address 0x");
- if (address<16)
- Serial.print("0");
- Serial.print(address,HEX);
- Serial.println(" !");
- nDevices++;
- }
- else if (error==4)
- {
- Serial.print("Unknown error at address 0x");
- if (address<16)
- Serial.print("0");
- Serial.println(address,HEX);
- }
- }
- if (nDevices == 0)
- Serial.println("No I2C devices found\n");
- else
- Serial.println("done\n");
- delay(5000); // wait 5 seconds for next scan
- }
// Change the 0x3F i2c address to your i2c
// include the library code:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// Change the 0x3F i2c address to your i2c
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.clear();
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
}
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // set the LCD address to 0x3F for a 16 chars and 2 line display
void setup() {
lcd.begin(16, 2);
lcd.clear();
lcd.backlight(); // Make sure backlight is on
// Print a message on both lines of the LCD.
lcd.setCursor(2,0); //Set cursor to character 2 on line 0
lcd.print("Hello Synth");
lcd.setCursor(5,1); //Move cursor to character 5 on line 1
lcd.print("Nerds !");
}
void loop() {
}
https://maxpromer.github.io/LCD-Character-Creator/
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
byte heart[] = {
0x00,
0x0A,
0x1F,
0x1F,
0x0E,
0x04,
0x00,
0x00
};
void setup() {
lcd.begin(16, 2);
lcd.backlight(); // turn backlight on
lcd.clear(); // clear the screen
lcd.createChar(1, heart); // define a symbol for memory position 1
lcd.setCursor(0, 1); // set the cursor to position 1, line 2
lcd.print("I "); // write on the screen
lcd.write(1); // write symbol from memory position 1
lcd.print(" Synthesizers"); // write on the screen
}
void loop() {}
https://maxpromer.github.io/LCD-Character-Creator/
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// RS, E, D4, D5, D6, D7
byte customChar[] = {
0x00,
0x02,
0x02,
0x0A,
0x0B,
0x1B,
0x1F,
0x1F
};
void setup() {
lcd.begin(16, 2);
lcd.backlight(); // turn backlight on
lcd.clear(); // clear the screen
lcd.createChar(1, customChar); // define a symbol for memory position 1
lcd.setCursor(0, 1); // set the cursor to position 1, line 2
lcd.print("I "); // write on the screen
lcd.write(1); // write symbol from memory position 1
lcd.print(" Synthesizers"); // write on the screen
}
void loop() {}