Prusa i3 (i3 stands for third iteration of the design) is the latest design by me. There are countless variations of the design and it became a staple of 3D printing with tens, if not hundreds, of thousands units world wide. You can build simple one for couple hundred dollars or you can chip in more and get the state of the art 3D printer, it’s all up to you.It’s open functional design allows for quick maintenance. For example if our DumbExtruder™ (LOL) breaks you can clean it in couple seconds! This makes i3 great workhorse 3D printer for your business. Not to mention the ability to upgrade the printer as you wish without manufacturer forcing you to buy a new model! Future-proof FTW!
Month: March 2017
Xen
Xen Project (pronounced as /ˈzɛn/ /prˈɒdʒɛkt/) is a hypervisor using a microkernel design, providing services that allow multiple computer operating systems to execute on the same computer hardware concurrently. It was developed by the Linux Foundation and is supported by Intel.
The University of Cambridge Computer Laboratory developed the first versions of Xen. The Xen Project community develops and maintains Xen Project as free and open-source software, subject to the requirements of the GNU General Public License (GPL), version 2. Xen Project is currently available for the IA-32, x86-64 and ARM instruction sets.
Source: Xen – Wikipedia
QEMU
QEMU (short for Quick Emulator) is a free and open-source hosted hypervisor that performs hardware virtualization (not to be confused with hardware-assisted virtualization).
QEMU is a hosted virtual machine monitor: it emulates CPUs through dynamic binary translation and provides a set of device models, enabling it to run a variety of unmodified guest operating systems. It also can be used together with KVM in order to run virtual machines at near-native speed (requiring hardware virtualization extensions on x86 machines). QEMU can also do CPU emulation for user-level processes, allowing applications compiled for one architecture to run on another.
Source: QEMU – Wikipedia
Kernel-based Virtual Machine
Kernel-based Virtual Machine (KVM) is a virtualization infrastructure for the Linux kernel that turns it into a hypervisor. It was merged into the Linux kernel mainline in kernel version 2.6.20, which was released on February 5, 2007.[1] KVM requires a processor with hardware virtualization extensions.[2] KVM has also been ported to FreeBSD[3] and illumos[4] in the form of loadable kernel modules.
KVM originally supported x86 processors and has been ported to S/390,[5] PowerPC,[6] and IA-64. An ARM port was merged during the 3.9 kernel merge window.[7]
A wide variety of guest operating systems work with KVM, including many flavours and versions of Linux, BSD, Solaris, Windows, Haiku, ReactOS, Plan 9, AROS Research Operating System[8] and OS X.[9] In addition, Android 2.2, GNU/Hurd[10] (Debian K16), Minix 3.1.2a, Solaris 10 U3 and Darwin 8.0.1, together with other operating systems and some newer versions of these listed, are known to work with certain limitations.[11]
Paravirtualization support for certain devices is available for Linux, OpenBSD,[12] FreeBSD,[13]NetBSD,[14] Plan 9[15] and Windows guests using the VirtIO[16] API. This supports a paravirtual Ethernet card, a paravirtual disk I/O controller,[17] a balloon device for adjusting guest memory usage, and a VGA graphics interface using SPICE or VMware drivers.
Arduino Blog – Handy Arduino Uno R3 Pinout Diagram
RF 433MHz Transmitter/Receiver Module With Arduino | Random Nerd Tutorials
This post aims to be a complete guide for the popular RF 433MHz Transmitter/Receiver module. with the Arduino
Source: RF 433MHz Transmitter/Receiver Module With Arduino | Random Nerd Tutorials
Kodi – ArchWiki
Kodi (previously known as XBMC), is a free, open source (GPL) multimedia player that originally ran on the first-generation Xbox, and now runs on Linux, OS X, Windows, Android and iOS. Kodi can be used to play/view the most popular video, audio, and picture formats, and many more lesser-known formats, including:
- Video – DVD-Video, VCD/SVCD, MPEG-1/2/4, DivX, XviD, Matroska
- Audio – MP3, AAC.
- Picture – JPG, GIF, PNG.
These can all be played directly from a CD/DVD, or from the hard-drive. Kodi can also play multimedia from a computer over a local network (LAN), or play media streams directly from the Internet. For more information, see the Kodi FAQ.
As of version 12, it can also be used to play and record live TV using a tuner, a backend server and a PVR plugin; more information about this can be found on the Kodi wiki.
Source: Kodi – ArchWiki
How do I make Thunderbird open links in Chromium? – Ask Ubuntu
I want to be able to click links in Thunderbird emails and have them open in Chromium (package name
chromium-browser
). Instead, they open in Firefox.I have tried the following:
- xfce preferred applications (Chromium is not listed, so I had to hunt down the executable) — next time I run chromium, it complains that it is no longer the default browser.
- Telling Chromium to set itself as the default browser. Thunderbird opens links in Firefox.
- update-alternatives. It’s already listed as an alternative at the same priority as Firefox. The “open web browser” app menu item opens Chromium. Thunderbird opens links in Firefox.
I have looked through the entire preferences gui in Thunderbird (but not the advanced config editor yet) and seen nothing that mentions what browser to open links in.
Please note that this is not Google Chrome
Source: How do I make Thunderbird open links in Chromium? – Ask Ubuntu
ESP8266 – Basic Wiring functions
Basic Wiring functions
pinMode(), digitalRead(), digitalWrite(), analogWrite() work as usual.
Pin numbers correspond directly to the esp8266 GPIO pin numbers. To read GPIO2, call digitalRead(2);
All digital IO pins are protected from over-voltage with a snap-back circuit connected between the pad and ground. The snap back voltage is typically about 6V, and the holding voltage is 5.8V. This provides protection from over-voltages and ESD. The output devices are also protected from reversed voltages with diodes.
At startup, pins are configured as INPUT.
GPIO0-GPIO15 can be INPUT, OUTPUT, or INPUT_PULLUP.
GPIO16 can be INPUT, OUTPUT, or INPUT_PULLDOWN_16. It is also XPD for deepSleep() (perhaps via a small capacitor.)
Note that GPIO6-GPIO11 are typically used to interface with the flash memory ICs on most esp8266 modules, so these pins should not generally be used.
analogRead(A0) reads the value of the ADC channel connected to the TOUT pin.
Analog ADC
ESP8266EX also integrates a generic purpose 10-bit analog ADC. The ADC range is from 0V to 1.0V. It is typically used to measure the voltages from the sensor or battery status. The ADC cannot be used when the chip is transmitting. Otherwise the voltage may be inaccurate. (From Expressif datasheet CH 8.5)
Interrupts
Pin interrupts are supported through attachInterrupt(), detachInterrupt() functions. Interrupts may be attached to any GPIO pin except GPIO16, but since GPIO6-GPIO11 are typically used to interface with the flash memory ICs on most esp8266 modules, applying interrupts to these pins are likely to cause problems. Standard Arduino interrupt types are supported: CHANGE, RISING, FALLING.
PWM
analogWrite(pin, value) enables software PWM on the given pin. PWM may be used on pins 0 to 15. Call analogWrite(pin, 0) to disable PWM on the pin. Value may be in range from 0 to 1023. 0 to 255 is normal on an Arduino board, as it’s an 8bit ADC, but ESP8266 is 10 bit so 1023 is full duty cycle.
Pin Functions
The most usable pin functions are mapped to the macro SPECIAL, so calling pinMode(pin, SPECIAL) will switch that pin to UART RX/TX on pins 1 – 3, HSPI for pins 12-15 and CLK functions for pins 0, 4 and 5.
SPECIAL maps to:
-
0. CLK_OUT
-
1. TX0
-
2. TX1
-
3. RX0
-
4. CLK_XTAL
-
5. CLK_RTC
-
12. SPI_MISO
-
13. SPI_MOSI
-
14. SPI_CLK
-
15. SPI_SS
You can activate any “FUNCTION” with pinMode(pin, FUNCTION1) for example.
Note: Func number 1-5 in Expressif table corresponds to FUNCTION 0-4 in SDK
http://bbs.espressif.com/download/file.php?id=442
ESP8266 has three modes of operation: SDIO mode, UART mode and FLASH mode. These are obtained by pulling three pins either high or low at bootup: GPIO15, GPIO0, GPIO2 according to this table:
0 Low
1 High
x floating
MODE | GPIO15 | GPIO0 | GPIO2 |
---|---|---|---|
SDIO (BootSDCard) | 1 | x | x |
UART (UploadCode) | 0 | 0 | x or 1 |
FLASH (NormalRunning) | 0 | 1 | x or 1 |
Note :- GPIO2 It is considered safer to pull it high with a resistor on boot rather than leave it floating to avoid possible chip damage if pin is pulled high by your program but also see http://www.esp8266.com/viewtopic.php?f=6&t=3862&p=22524#p22524.
FLASH mode is when running the program. Take GPIO0 high or float or it will stall on first reset, intentional or not.
UART mode is how the code is uploaded to the chip and GPIO0 and GPIO15 must be low on boot to enter this mode.
SDIO mode is where the chip boots from an SD card. I don’t think this is available to us yet.
UART pins
Note that there’s a special switch to swap UART0 RX/TX with UART0 CTS/RTS which is what systemuartswap does and is explained in http://bbs.espressif.com/viewtopic.php?f=7&t=22&p=54&hilit=system_uart_swap#p54:
#define FUNC_U0CTS 4 #define FUNC_U0RTS 4 void user_init(void) { PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, FUNC_U0CTS);//CONFIG MTCK PIN FUNC TO U0CTS PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_U0RTS);//CONFIG MTDO PIN FUNC TO U0RTS SET_PERI_REG_MASK(0x3ff00028 , BIT2);//SWAP PIN : U0TXD<==>U0RTS(MTDO) , U0RXD<==>U0CTS(MTCK) ...... }
Original func:
U0TXD⇒pin:U0TXD
U0RXD⇒pin:U0RXD
U0CTS⇒pin:MTCK
U0RTS⇒pin:MTDO
After pin swap:
U0TXD⇒pin:MTDO
U0RXD⇒pin:MTCK
U0CTS⇒pin:U0RXD
U0RTS⇒pin:U0TXD
This allows the MTDO and MTCK to be connected to a microcontroller as UART tx/rx. The bootup info will be output via U0TXD pin, but after start-up, the UART0 will output data via MTDO and receive via MTCK.
kolban asserts: “The device writes to UART1 by itself in certain circumstances. First, when you flash the device, the data received is apparently also written to the TX pin of UART1 (GPIO2). Second, the ‘debug’ code in the device writes its output to UART1.”
If anyone has a reference for this please post it on the thread http://www.esp8266.com/viewtopic.php?f=6&t=3862&p=22524#p22524
LED Pin
GPIO1, which is also TX, is wired to the blue LED on many devices. Note that the LED is active low (connected to Vcc and sinks through the chip to ground) so setting a logical value of 0 will light it up. Since GPIO1 is also the TX pin, you won’t be able to blink the LED and perform Serial communications at thew same time unless you switch TX/RX pins.
Maximum Current
When using a GPIO as output (i.e. to drive something such as an LED) it is important to note that the maximum output current is 12mA. (IMAX=12mA per Espressif datasheet) If you try and output more current than that, you run the risk of damaging the device. Since many LEDs are able to draw 20mA you should adjust your current limiting resistor to be 12mA or less. Using https://en.wikipedia.org/wiki/LED_circuit – R=(Vout-Vled)/I so (3.3V-1.8Vred) at 12mA = 125Ω min for a red LED.
ESP8266-01 Pin Magic How to use the ESP8266-01 pins
Introduction
ESP8266-01 is a very low cost WiFi enabled chip. But it has very limited I/O. At first glance, once you configure it for programming all the pins are used. This page builds on Using ESP8266 GPIO0/GPIO2/GPIO15 pins to show you how you can get four (4) usable inputs/outputs for you next ESP8266-01 project and how to use IC2 to get even more inputs.
The code here assumes you are programming the module using the Arduino IDE setup as described on https://github.com/esp8266/arduino under Installing With Boards Manager. When opening the Boards Manager from the Tools → Board menu and select Type Contributed and install the esp8266 platform. Also see ESP8266 Programming Tips (espcomm failed)
ESP8266-01 Pins
The ESP8266-01 is the smallest ESP8266 module and only has 8 pins. Of these VCC, GND, RST (reset) and CH_PD (chip select) are not I/O pins but are needed the operation of the module. This leaves GPIO0, GPIO2, TX and RX available as possible I/O pins, but even these have pre-assigned functions. The GPIO0 and GPIO2 determine what mode the module starts up in and the TX/RX pins are used to program the module and for Serial I/O, commonly used for debugging. GPIO0 and GPIO2 need to have pull-up resistors connected to ensure the module starts up correctly.
Best Trick – Use I2C
The best trick to get extra inputs into the ESP8266-01 is to use an I2C interface.
One choice is to use GPIO0 and GPIO2 as the I2C bus.
The pullup resistors needed to get the module to start up correctly can double as the I2C bus pull-up resistors and the other, slave, components on the bus are open collector and so should not pull the bus down on power-up. However in some cases slaves, particularly those with battery backup, can become stuck and hold the bus down. In those cases you will need to isolate the bus until the ESP8266 gets through its boot stage.
You can avoid this issue by using TX and RX for the I2C bus
A few things to note:
- GPIO1 (TX) is used as the Data line, because you will always get some debug output on GPIO1 on power up. There is no way to suppress this output, but the Clock line (RX) will be held high so none of this data will be clocked to the slaves
- When programming the ESP8266, the RX line is connected to the programmer’s output. At the end of the programming the ESP8266 reboots and 330 Protection resistor prevents RX shorting the programmer’s output drive.
- The I2C series resistors provide similar protection for the TX, RX from shorts on the I2C bus
The ESP8266 is 3.3V device so preferably use 3.3V I2C slaves. Many, but not all, I2C devices are are 3.3V these days. “In general, in a system where one device is at a higher voltage than another, it may be possible to connect the two devices via I2C without any level shifting circuitry in between them. The trick is to connect the pull-up resistors to the lower of the two voltages.” (SparkFun I2C tutorial) For a mixture of 5V and 3.3V devices connect the pullup resistors to the 3.3V line, as shown above.
Using I2C is a great way to add a multi-channel A-to-D converter to the ESP8266-01 which does not expose the single ADC input of the underlying module. For example using Adafruit 12bit I2C 4 channel ADC or for analog output SparkFun’s I2C DAC Breakout – MCP4725 board. Many other types of sensors are also available with I2C buses.
See http://www.i2c-bus.org/i2c-primer/common-problems/ for more information of overcoming I2C problems. Also see Reliable Startup for I2C Battery Backed RTC for a short method to help clear the bus
Using the GPIO0 /GPIO2 for OUTPUT and RX for INPUT
While can send debug messages over the WiFi connection it is often convenient to use the TX connection. The next example show how to use GPIO0 and GPIO2 as outputs and RX as an input.
Using
Serial.begin(115200,SERIAL_8N1,SERIAL_TX_ONLY);
allows you to use RX as a general purpose input (or another output), while still writing debug messages to Serial. Again the 330 ohm resistor in the RX lead to the Flash programmer protects against shorting out the programmer’s driver.
NOTE: S1 will have to be open in order to program the ESP8266.
The TX pin accessed from the sketch as GPIO1 and RX is GPIO3
Another Trick – Driving a Relay and Reading a Push Button using GPIO0 / GPIO2
Here is another way of configuring the pins. Note: This trick only works if you have a relay module with an isolated input (N1 and N1-com). Because of this limitation and the complexity of the supporting code, the previous example, using RX as an input, is preferable.
Using ESP8266 GPIO0/GPIO2/GPIO15 pins has already covered how to use GPIO0/GPIO2 together to get an extra input. Here that example will be extended to use GPIO0 as an relay driver output and GPIO0/GPIO2 as an input without using RX or TX.
Here is the schematic as a pdf.
Here GPIO0 is used as an output to drive the relay and GPIO0/GPIO2 is used as an input to read the momentary push button which is used as a manual override to turn the relay on and off, in addition to the remote control over the WiFi connection. The momentary push button is also used to enable the config mode if it is press when power is applied.
The trick here is to do all this while still keeping GPIO0 and GPIO2 high when the ESP8266 module is initializing.
The pull-up resistors, R1 and R3, provide the necessary High for these two pins, but you have to ensure that any extra circuitry attached to GPIO0 and GPIO2 cannot not pull pins low. The optically isolated relay is connected between +3.3V and GPIO0. This keeps GPIO0 high on start up but allows GPIO0 to be made an output, after startup, and ground the relay input to operate the relay. It does not matter if the momentary push button is operated while the module is initializing, as that just connects GPIO0 to GPIO2 and connect both of these to their pullup resistors.
Detecting Config Mode
Using the ESP8266 as a temporary access point you can configure it via a web page as described here. Part of that process is to use a push button, or shorting link, on power-up to indicate to the software that you want to enter config mode.
Once the ESP8266 module has initialized, it runs the setup() code. In that code, to detect if the momentary push button is pressed, you need not make GPIO0 low to supply a GND to push button and then check the GPIO2 input to see if it low. A side affect of this check is that the relay will always be operated when the unit is being put into config mode. Once you see the relay operate you can can release the push button, because its input will have been detected by then.
Here is some sample code to do this in the setup()
boolean configMode = false; // not in config mode normally void setup() { pinMode(0, OUTPUT); digitalWrite(0, LOW); // make GPIO0 output low // check GPIO2 input to see if push button pressed connecting it to GPIO0 configMode = (digitalRead(2) == LOW); if (configMode) { // start AP and get ready to serve config web page // leave relay on to indicate in config mode //…… } else { // normal usage // make GPIO0 HIGH to turn off the relay digitalWrite(0, HIGH); //….. } // rest of setup() }
Detecting the Manual Override Push Button
The previous section covered detecting when the push button was pressed on power up to enable config mode. We also want to use that push button as a manual override for turning the relay on and off in addition to being able to control the relay via the WiFi link.
The WiFi control of the relay is not covered here, but can easily be done using pfodApp. See OLIMEX Menu Generator for how to generate Arduino code with pfodDesigner for ESP8266 modules.
This section will deal with how to detect when the push button is pushed, indicating the user wants to toggle the relay, i.e. turn it OFF is it on or turn it ON if it is off.
The schematic is the same as above, all the tricks are in the code. There are two case to consider:-
i)The relay is OFF and the user wants to turn it on using the push button,
ii) The relay is ON and the user wants to turn it off using the push button.
The relay is OFF and the user wants to turn it on using the push button.
In this case the output of GPIO0 is HIGH. Actually GPIO0 can be an input in this case as the pull up resistor R1 will ensure the relay does not turn on. That is the trick. In this case make GPIO0 an Input and make GPIO2 Output LOW and then when the user presses the push button, two things will happen:- a) the relay will turn on due to the ground provided by GPIO2 via the push button and b) the Input GPIO0 will go low. The code checks the state of the Input GPIO0 and when it goes LOW the code knows the use has pressed the push button and wants the relay to be on. The code then makes GPIO0 an Output LOW to keep the relay on when the push button is released.
The relay is ON and the user wants to turn it off using the push button.
In this case, following on from the case above, GPIO0 is an Output LOW holding the relay ON. Now for this case make GPIO2 an Input (pulled up by R3) and then when the user presses the push button the Input GPIO2 is pulled LOW by the LOW Output on GPIO0. When the use releases the push button the code detect the LOW to HIGH transition and then makes GPIO0 an Input, which releases the relay due to the pull up resistor, R1, and makes GPIO2 an Output LOW to set up for case i) above.
One more trick. For case ii) we need GPIO2 as an Input which detects a LOW to HIGH transition to turn the relay OFF. But if we make GPIO2 and input at the end of case i) then we will get a LOW to HIGH transition as the user releases the push button they just pressed to turn the relay ON. To avoid turning the relay off again immediately, the first LOW to HIGH transition after turning the relay will be ignored as it is just the user releasing the push button they pressed to turn the relay ON.
Sample loop() Code for Relay Manual Over-ride
In this code I am ignoring switch debounce for simplicity. The inputs should be debounced in any real application.
The sample code is here, ESP8266_01pinMagic_1.ino
Again this leaves the TX / RX pins available for Serial debugging or use as other I/O
Conclusion
This page shows how to get the most out the limited pins available on the ESP8266-01. Using GPIO0 / GPIO2 as an I2C bus gives the biggest expansion, but if you project does not use I2C, you can still drive a relay and detect a push button input using GPIO0 / GPIO2. In either case TX is still available for Serial debugging or if you send debug print statements over the WiFi link, TX is also available for general I/O as well.
Putumayo – Nuestros Lazos
Putumayo – Nuestros Lazos
Dave Barbour & His Orchestra/Peggy Lee – Caramba! It’s the Samba
Dave Barbour & His Orchestra/Peggy Lee – Caramba! It’s the Samba