S3 i9300 CM11 min/max volume adjust

My phone is too loud for my ears on minimum settings.  If you have a rooted Samsung s3 i9300 on CyanogenMod ROM you can fix it.

To decrease the minimum volume or increase the maximum volume you must edit the file

/system/etc/sound/m0

For me the easiest way to do this was to download ZipME .  This app allows you to make an update.zip file that you can apply with something like clockwork mod.

Choose the file in zipME and browse through to etc/sound to select the “m0” file.

 

Extract this file onto your home computer.

Screenshot 2015-12-02 01.02.43.png

Change the values and save the zip file the way you found it.  Place the update.zip on your phone and install it via clockwork mod. (VOLUP,POWER,HOME … install from zip etc)

<device name="earpiece">
    <path name="on">
        <ctl name="RCV Switch" val="1"/>
        <ctl name="AIF1DAC1 Volume" val="96"/>
        <ctl name="AIF1 Boost Volume" val="0"/>
        <ctl name="DAC1 Volume" val="96"/>
        <ctl name="Left Output Mixer DAC Volume" val="7"/>
        <ctl name="Right Output Mixer DAC Volume" val="7"/>
        <ctl name="Output Volume" val="CHANGE_THIS_VALUE"/>

...
        <ctl name="RCV Switch" val="0"/>
        <ctl name="AIF1DAC1 Volume" val="96"/>
        <ctl name="AIF1 Boost Volume" val="0"/>
        <ctl name="DAC1 Volume" val="96"/>
        <ctl name="Left Output Mixer DAC Volume" val="7"/>
        <ctl name="Right Output Mixer DAC Volume" val="7"/>
        <ctl name="Output Volume" val="CHANGE_THIS_VALUE"/>

...
<device name="headphone">
    <path name="on">
        <ctl name="HP Switch" val="1"/>
        <ctl name="Headphone Volume" val="CHANGE_THIS_VALUE"/>

 

Alternatively just download this update.zip and edit where it says <!– Edit here –> and install it on your phone. (zip is set to CM11 default values)

EL Wire

ELDriver

I’m currently messing with some EL Wire’s.   The driver that came with them had the main IC scrubbed of identifying markings.  I want to control the EL Wire with a separate MCU so I’d like to figure out how to do that.

Choices at the moment are :

  1. Solder into the push button of the driver circuit with MCU output possibly via a transistor.
  2. Triac / Opto-isolator on driver output
  3. Cannibalise driver circuit to roll my own.

This might be how it’s wired (first time drawing a pre-existing board)
Screenshot 2015-02-07 13.55.40

Eagle CAD

I’m not enjoying it, but slowly I’m picking up Eagle for making PCB’s.  Not knowing how to do this has held back a lot of projects that I haven’t posted up here.  This simple single sided PCB hopefully marks the start of a new era of understanding for me 😉

No more using Adobe Illustrator to make circuit boards!! (Eagle need to hire some UX consultants, it feels so dirty trying to work in this software)

Screenshot 2015-01-23 16.02.07

Find the nearest node!

It works !! Step one towards creating the space colonisation algorithm… Onwards and upwards.

ArrayList attractors = new ArrayList();
SmartLine myLine = new SmartLine(0, 0, 0, 0);

int freq, widthCount, heightCount, count;

void setup() {
  size(1280, 720);//1280x720

    // Create attractors

  freq = 80;
  widthCount = width / freq;
  heightCount = height / freq;
  count = widthCount * heightCount;

  for (int j = 0; j < widthCount; ++j) {
    for (int k = 0; k < heightCount; ++k) {
      int randy = int(random(0, +freq*.9));
      attractors.add(new Attractor(j*freq+randy, k*freq+randy));
    }
  }
}

// Main loop

void draw() {
  background(0);
  for (int i = 0; i < attractors.size (); i++) {
    Attractor a = (Attractor) attractors.get(i);
    a.update();
  }
  stroke(100);
  myLine.find();
  myLine.update();
}

// Attractor Class

class Attractor {

  PVector p;
  boolean disabled = false;

  Attractor(int _x, int _y) {
    p = new PVector(_x, _y);
  }

  void update() {
    if (disabled==false) {
      noStroke();
      fill(255, 255);
      rect(p.x, p.y, 5, 5);
    } else {
      noStroke();
      fill(0, 255);
      rect(p.x, p.y, 5, 5);
    }
  }
}

// Line Class

class SmartLine {

  PVector src, des;

  SmartLine(int x1, int y1, int x2, int y2) {
    src = new PVector (x1, y1);
    des = new PVector (x2, y2);
  }

  void update () {
    line(src.x, src.y, des.x, des.y);
    src=des;
  }
  void find () {
    int arraySize = attractors.size();
    int [] distances = new int [arraySize];

    for (int i = 0; i < arraySize; ++i) {
      Attractor a = (Attractor) attractors.get(i);
      distances[i]= int(src.dist(a.p));
    }

    for (int i = 0; i < distances.length; ++i) {
      if (distances[i] == min(distances)) {
        Attractor a2 = (Attractor) attractors.get(i);
        des=a2.p;
        attractors.remove(i);
        break;
      }
    }
  }
}