Entradas

Mostrando las entradas de 2017

Ejecutar comandos SO desde consola Python

Ejecutar comandos SO desde consola Python La manera que utiliza python para comunicarse con el S.O. es a travez de los modulos, por ejemplo el que viene por defecto es el os. EJ.: import os print os.listdir('.') si queres ejecutar en comando externo: os.system('comando') si importa conocer la salida de dicho comando tenes una familia de comandos: os.popen() cambiar de directorio ~$ python Python 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.chdir('/tmp') >>> os.getcwd() '/tmp' >>> os.execl('/bin/bash', '-i') tmp$ exit logout ~$ fijate que a salir del shell vuelves al shell desde el que has ejecutado python. Si es un problema lo podrías solventar con un exec: ~$ exec python Python 2.4.4 (#2, Apr 5

Circuit GSM/GPRS

Imagen

Dowload videos from internet

link

How to install Eagle on ubuntu

Link of information

Hora en China

Hora actual en Shenzhen, China

Five Things You Need to Know about Writing Articles

1 The reader is identified An article is like a direct conversation with the reader. The exam question might tell you who your readers are. For example, the students at a school, or the people living in a town or people who are interested in sports. Everything you write must speak to that reader and engage their interest right from the first sentence. 2 It has to get attention If you're anywhere on the internet these days, you'll be bombarded with articles with headlines that pull the reader in. It's called "click baiting" and all the writer is trying to do is make you open the page to read their article.  You need to think like a journalist when you're writing your article. 3 It has to be interesting For an article to work, it has to be engaging enough to read all the way through. Remember how bored the examiner must be after reading fifty exam papers. Make it easier for them to get a good impression about your writing by entertaining them. Add h

Can you export correct formulas from math to writer?

You can insert LibreOffice Math file directly into Writer, no need to convert formula to picture. Once you're done working in Math, save the .odf file and open Writer document you want to insert formula into. Go to  Insert  ->  Object  ->  OLE Object , select " Create from file " then click on  Search , locate and open the .odf file you saved before. The Math formula is inserted in Writer document.

Pinguino Base

Link

Digikey

Resistencias de orificio Capacitores cerámicos  de orificio

Gerber Viewer Online

Link

Manejo de motores DC usando PWM

Imagen
Manejo de motores DC usando PWM En este tema usaremos nuestros conocimientos del PWM del PIC para guiar un motor de corriente continua (DC).  En esta primera entrada simplemente aplicaremos un PWM con un duty variable al motor y observaremos su respuesta (velocidad) usando los codificadores en cuadratura explicados en la entrada anterior. Obviamente el PIC no puede proporcionar la intensidad necesaria para mover un motor, por lo que necesitaremos algún tipo de driver o interfaz. Para poder manejarlo en las dos direcciones usaremos un driver configurado como un puente en H (H-bridge). Describiremos el popular integrado (aunque no especialmente eficaz) L293D. Otras alternativas basadas en MOSFETs son más eficientes, pero el concepto y la forma de controlar el MOTOR serán comunes. --------------------------------------------------------------------------------------------------------- Interfaz con el motor: L293 H-bridge Las dos funciones que nos
Imagen
Cuando trabajamos con  motores de corriente continua  no siempre las aplicaciones se limitan a una función de marcha plena en alguno de los dos sentidos posibles ( CW  y  CCW ). En la mayoría de los diseños debemos controlar las revoluciones por minuto de los motores de acuerdo al desarrollo efectuado y el sentido de giro que esta rotación debe tener. Es por esto que, cuando necesitamos invertir el movimiento mecánico del sistema debemos apelar a utilizar  un puente H , en consecuencia, utilizaremos el mismo sistema que comenzamos a delinear en la segunda parte de esta serie de artículos. En esta etapa final, abordaremos los métodos más apropiados para controlar mediante la  modulación de ancho de pulsos (PWM)  la velocidad, el sentido de rotación y el frenado de un motor CC. Haciendo un breve repaso de los conceptos elementales a tener en cuenta en nuestro desarrollo, donde será necesario controlar la velocidad, el sentido de giro y el frenado de un motor de corriente continua, po

PIC18F4550 RB0 Interrupt

Imagen
Interrupts! You use them to detect the change in pin status, timers, communication and so on. I’m sure if you reached this post in need of using interrupts (or having trouble with interrupts), then I assume you know what interrupts are and what you are trying to use. With XC8, using interrupts is programmatically simple, since most of the code layout is given to you by <xc.h>. Now setting up interrupts is as simple as using the keyword “interrupt” before the function which should be called when an interrupt happens. I am not going to cover the difference between C18 and XC8 (XC8 makes your life a lot easier), but I’ll show you how to use interrupts in XC8. This post will have only the input from pin change. The timer interrupt will be covered later in the timer chapter. I encourage you to read the datasheet in order to understand much better about interrupt registers. Make sure the IO pin you are going to use for interrupt actually has interrupt feature. Because I have see

FPA Algorithm

Flower Pollination Algorithms The flower pollination algorithm (FPA) was developed by Xin-She Yang in 2012, inspired by the pollination process of flowering plants. FPA has been extended to multiobjective optimization with promising results. This chapter provides an introduction to FPA and its basic implementation. 11.1 Introduction Real-world design problems in engineering and industry are usually multi-objective or multicriteria. These multiple objectives often conflict with one another, which makes it impossible to use any single design option without compromise. Common approaches are to provide good approximations to the true Pareto fronts of the problem of interest so that decision makers can rank different options, depending on their preferences or their utilities [1,5,15]. Compared with single-objective optimization, multi-objective optimization has its additional challenging issues such as time complexity, inhomogeneity, and dimensionality. It is usua

PWM with transistor

Imagen
The PWM control is used to generate a PWM output signal on an output port.  A PWM signal is a pulse that repeats at a fixed frequency.  The width of the pulse can be varied from 0 to 100%. The image above shows the PWM signal, plotting the output voltage against time.  The period specifies the time the pulse repeats.  The frequency of the signal is 1 / period, where the period is in seconds.  In the example above, the pulse width, or duty cycle, is about 66%. The frequency of the PWM signal and the resolution of the pulse width are defined as characteristics of the microcontroller.  See the section on  timers  for more information. The frequency of the PWM signal can be configured to be anything from 0.1Hz to 4MHz.  For controlling LED brightness anything above 1kHz is fine. So what is a PWM signal used for?  In a HID device, they can be used for driving LEDs and other external loads.  Hooking up an  RGB LED  to 3 PWM outputs will give infinite colour control of the LED.  Th