domingo, 13 de septiembre de 2015

philips - dps-298cp-4a

el televisor no hace nada.
el testigo stand-by no se ilumina
al cambiar los diodos se ha resuelto


jueves, 5 de febrero de 2015

running Desktop Console from batch file

next section comes from link

If you may wan to run Desktop Console from a batch file, for example RDC over VPN, you can use mstsc /v:servername /console command.
Mstsc
Creates connections to terminal servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
Syntax
mstsc.exe {ConnectionFile | /v:ServerName[:Port]} [/console] [/f] [/w:Width /h:Height]
mstsc.exe /edit"ConnectionFile"
mstsc.exe /migrate
Parameters
ConnectionFile
Specifies the name of an .rdp file for the connection.
/v:ServerName[:Port]
Specifies the remote computer and, optionally, the port number to which you want to connect.
/console
Connects to the console session of the specified Windows Server 2003 family operating system.
/f
Starts Remote Desktop connection in full-screen mode.
/w:Width /h:Height
Specifies the dimensions of the Remote Desktop screen.
/edit"ConnectionFile"
Opens the specified .rdp file for editing.
/migrate
Migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.
Remarks
  • You must be an administrator on the server to which you are connecting to create a remote console connection.
  • default.rdp is stored for each user as a hidden file in My Documents. User created .rdp files are stored by default in My Documents but can be moved anywhere.
Examples
To connect to the console session of a server, type:
mstsc /console
To open a file called filename.rdp for editing, type:
mstsc /edit filename.rdp

domingo, 25 de enero de 2015

FROM ARDUINO TO MATPLOTLIB

http://www.toptechboy.com/tutorial/python-with-arduino-lesson-11-plotting-and-graphing-live-data-from-arduino-with-matplotlib/

FROM ARDUINO YUN SIDE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "Wire.h"    // imports the wire library for talking over I2C
#include "Adafruit_BMP085.h"  // import the Pressure Sensor Library
Adafruit_BMP085 mySensor;  // create sensor object called mySensor
 
float tempC;  // Variable for holding temp in C
float tempF;  // Variable for holding temp in F
float pressure; //Variable for holding pressure reading
 
void setup(){
Serial.begin(115200); //turn on serial monitor
mySensor.begin();   //initialize mySensor
}
 
void loop() {
tempC = mySensor.readTemperature(); //  Be sure to declare your variables
tempF = tempC*1.8 + 32.; // Convert degrees C to F
pressure=mySensor.readPressure(); //Read Pressure
 
 
Serial.print(tempF);
Serial.print(" , ");
Serial.println(pressure);
delay(250); //Pause between readings.
}

FROM PYTHON 2.7 SIDE
import serial # import Serial Library
import numpy  # Import numpy
import matplotlib.pyplot as plt #import matplotlib library
from drawnow import *

tempF= []
pressure=[]
arduinoData = serial.Serial('COM8', 9600) #Creating our serial object named arduinoData
plt.ion() #Tell matplotlib you want interactive mode to plot live data
cnt=0

def makeFig(): #Create a function that makes our desired plot
    plt.ylim(80,90)                                 #Set y min and max values
    plt.title('My Live Streaming Sensor Data')      #Plot the title
    plt.grid(True)                                  #Turn the grid on
    plt.ylabel('Temp F')                            #Set ylabels
    plt.plot(tempF, 'ro-', label='Degrees F')       #plot the temperature
    plt.legend(loc='upper left')                    #plot the legend
    plt2=plt.twinx()                                #Create a second y axis
    plt.ylim(93450,93525)                           #Set limits of second y axis- adjust to readings you are getting
    plt2.plot(pressure, 'b^-', label='Pressure (Pa)') #plot pressure data
    plt2.set_ylabel('Pressrue (Pa)')                    #label second y axis
    plt2.ticklabel_format(useOffset=False)           #Force matplotlib to NOT autoscale y axis
    plt2.legend(loc='upper right')                  #plot the legend
    

while True: # While loop that loops forever
    while (arduinoData.inWaiting()==0): #Wait here until there is data
        pass #do nothing
    arduinoString = arduinoData.readline() #read the line of text from the serial port
    dataArray = arduinoString.split(',')   #Split it into an array called dataArray
    temp = float( dataArray[0])            #Convert first element to floating number and put in temp
    P =    float( dataArray[1])            #Convert second element to floating number and put in P
    tempF.append(temp)                     #Build our tempF array by appending temp readings
    pressure.append(P)                     #Building our pressure array by appending P readings
    drawnow(makeFig)                       #Call drawnow to update our live graph
    plt.pause(.000001)                     #Pause Briefly. Important to keep drawnow from crashing
    cnt=cnt+1
    if(cnt>50):                            #If you have 50 or more points, delete the first one from the array
        tempF.pop(0)                       #This allows us to just see the last 50 data points
        pressure.pop(0)

sábado, 24 de enero de 2015

Python Shell is not charged in Python 2.7

c:\python32\python.exe -m idlelib.idle

Microsoft Visual C++ Compiler for Python 2.7

http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

  • Microsoft Visual C++ Compiler for Python 2.7

    If your download does not start after 30 seconds, Click here
    • Install Instructions
        Installing and Uninstalling The compiler package will default to installing just for the current user and does not require administrative privileges. To install for all users of a machine, execute msiexec /i ALLUSERS=1 from an elevated Command Prompt.

        To remove or repair the compiler package, locate the entry in Programs and Features and select Remove or Repair.

        Using with Python distribution tools
        Python package developers should download and use this compiler to produce binary wheels for their Python packages to upload to PyPI. Installing the wheel package, updating to setuptools 6.0 or later, and adding setup.py bdist_wheel upload to your build process will produce the correct files (remember to do this for both 32-bit and 64-bit versions).

        If a Python package you are installing does not have a wheel, you can install this compiler package on your own machine. Once the compiler is installed and you have updated to setuptools 6.0 or later, you can use pip install to build and install the Python package. If you are managing multiple machines and need to install the Python package on all of them, you should install thewheel package and use pip wheel to produce a wheel that can be installed on machines without requiring this package.

http://matplotlib.org/users/installing.html

Windows

If you don’t already have Python installed, we recommend using one of the scipy-stack compatible Python distributions such as Python(x,y), Enthought Canopy, or Continuum Anaconda, which have matplotlib and many of its dependencies, plus other useful packages, preinstalled.
For standard Python installations you will also need to install compatible versions of setuptoolsnumpypython-dateutilpytzpyparsing and six in addition to matplotlib.
In case Python is not installed for all users (not the default), the Microsoft Visual C++ 2008 ( 64 bit or 32 bit for Python 2.6 to 3.2) or Microsoft Visual C++ 2010 ( 64 bit or 32 bit for Python 3.3 and 3.4) redistributable packages need to be installed.
Matplotlib depends on Pillow for reading and saving JPEG, BMP, and TIFF image files. Matplotlib requires MiKTeX and GhostScript for rendering text with LaTeX. FFmpegavconvmencoder, or ImageMagick are required for the animation module.
The following backends should work out of the box: agg, tkagg, ps, pdf and svg. For other backends you may need to install pycairoPyQt4,PyQt5PySidewxPythonPyGTKTornado, or GhostScript.
TkAgg is probably the best backend for interactive use from the standard Python shell or IPython. It is enabled as the default backend for the official binaries. GTK3 is not supported on Windows.
The Windows installers (*.exe) and wheels (*.whl) on the download page do not contain test data or example code. If you want to try the many demos that come in the matplotlib source distribution, download the *.tar.gz file and look in the examples subdirectory. To run the test suite, copy the libmatplotlibtests and libmpl_toolkitstests directories from the source distribution to sys.prefixLibsite-packagesmatplotliband sys.prefixLibsite-packagesmpl_toolkits respectively, and install nosemock, Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, and Inkscape.

Windows (simplified)

For Windows without PowerShell 3 or for installation without a command-line, download ez_setup.py using your preferred web browser or other technique and "run" that file.



http://matplotlib.org/users/installing.html

Arduino and Python LESSON 2: Installing the Software and Libraries

Introduction to NumPy and Matplotlib

How to install pip on Windows (The easy way)