background preloader

Arduino

Facebook Twitter

Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino. Tip A summary of everything shown below is available further down this page: This post describes how the I2C (Inter-Integrated Circuit, or "Two-Wire") interface works, with particular reference to the Arduino Uno which is based on the ATmega328P microprocessor chip.

Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino

A lot of the details however will be of more general interest. The Two-Wire interface is extremely useful for connecting multiple devices, as they can all share the same two pins (plus a ground return). This is because the devices are "addressable". Because of this you could have an LCD screen (say) at address 10, a keyboard at address 11, and so on. Программирование Arduino - библиотека Wire - для работы с I2C / Arduino-мания :)

Микроконтроллеры Atmega имеют хардварную поддержку интерфейса (TWI).

Программирование Arduino - библиотека Wire - для работы с I2C / Arduino-мания :)

Линии интерфейса SDA и SCL у МК Atmega8/168/328, сидят на 27 (PC4) и 28 (PC5), соответственно. На платах , линия данных — SDA (data line) выведена на аналоговый пин 4, а линия тактирования — SCL (clock line) выведена на аналоговый пин 5. S musing on technology: Arduino SD data logger with time stamp. I've been learning about powering my ham shack with solar power and have been working on logging battery voltage to get information about how my power budget is going.

s musing on technology: Arduino SD data logger with time stamp

At first I used an Arduino's A/D to read the voltage and periodically send it out the USB serial port, but as the shed has no mains power the laptop was a major drain on the battery itself. Yes, measuring was really altering the experiment. An SD Shield Plus, purchased via eBay, has all the things you need for stand alone data logging. An SD slot, a battery backed clock, and even a bit of non-volatile utility ram. My Arduino is a slightly older model, the Diecimila and I found that as soon as I called SD.begin() the device would reset. The new Arduino Uno looks like a good improvement. Arduino. Генератор сигналов - Vanyamba uses Linux. Hosting of a little website with jquery mobile elements.

An Arduino universal remote: record and playback IR signals. I've implemented a simple IR universal remote that will record an IR code and retransmit it on demand as an example for my IR library.

An Arduino universal remote: record and playback IR signals

Handling IR codes is a bit more complex than it might seem, as many protocols require more than simply recording and playing back the signal. To use the universal remote, simply point your remote control at the IR module and press a button on the remote control. Then press the Arduino button whenever you want to retransmit the code. My example only supports a single code at a time, but can be easily extended to support multiple codes. The hardware The above picture shows the 9V battery pack, the Arduino board, and the proto board with (top-to-bottom) the IR LED, IR receiver, and pushbutton.

The circuitry is simple: an IR sensor module is connected to pin 11 to record the code, an IR LED is connected to pin 3 to transmit the code, and a control button is connected to pin 12. The software Handling different protocols. Simple IR remote. Проблема с ИК. Arduino: управление с помощью ИК-пульта. Прошерстив старые россыпи радиодеталей, нашел ик-приемник TSOP-1736.

Arduino: управление с помощью ИК-пульта

Arduino SD data logger with time stamp. Add an SD card slot to a WRT54G v2 « Your Warranty Is Void.com. In this post, we’ll cover step-by-step how to add a SD cardslot to your Linksys WRT54G running DD-WRT and how to configure it in the DD-WRT UI.

Add an SD card slot to a WRT54G v2 « Your Warranty Is Void.com

Granted, this has been done a lot already, however there is a significant lack of information on how to do it on the older V2’s. Read more for the complete step-by-step guide. One of the advantages to using alternative firmware on “stock” devices is that it allows you to unlock the full potential of your hardware. Using the latest version of DD-WRT, you can now enable esternal storage on your WRT54G to add to the default image. With additional storage for your router, the possibilities are endless. PLEASE NOTE: The pictures and information for adding the SD cardslot is only applicable to the Version 2 of the Linksys router.

Items Required: Arduino with 2wire/SMBUS digital thermometer. Hello Everyone, I finally managed to get my Arduino talking to a DS1624 Digital Thermometer and Memory IC that I had lying around for a while and thought it might be useful to use for homebrewing.

Arduino with 2wire/SMBUS digital thermometer

Two wire devices typically only have 4 wires going to them (power, ground and 2 communications lines) and can be installed on a bus and individually addressed. All of the a/d conversion is done on the chip and then the information is transmitted digitally back to the Arduino. Think of it as a mini network connected to the Arduino. The benefits of reading temperatures this way are that you don't need to use any analog ports and you can hook up more than one to the "network" (in the case of the DS1624, there can be a maximum of 8 per "network"). Arduino. Генератор сигналов - Vanyamba uses Linux. DS1307 показывают странное время, которое стоит. Humidity and temperature measurements with Sensirion’s SHT1x/SHT7x sensors (Part 1) Temperature and relative humidity are two very important ambient parameters that are directly related to human comfort.

Humidity and temperature measurements with Sensirion’s SHT1x/SHT7x sensors (Part 1)

Sometimes, you may be able to bear higher temperatures, if there is a lower relative humidity, such as in hot and dry desert-like environment. However, being in a humid place with not very high temperature may make you feel like melting. This is because if there is high relative humidity, sweat from our body will evaporate less into the air and we feel much hotter than the actual temperature. Humidifiers and dehumidifiers help to keep indoor humidity at a comfortable level. Today we will discuss about Sensirion’s SHT series of digital sensors, more specifically SHT11 and SHT75, which are capable of measuring both temperature and relative humidity and provide fully calibrated digital outputs.

Relative humidity and temperature measurements with SHT1x and SHT7x sensors Theory SHT1x, 2x, and 7x series of humidity sensors (Source: Humidity and temperature measurements with Sensirion’s SHT1x/SHT7x sensors (Part 2) In Part 1 of this tutorial, we discussed about Sensirion’s SHT1x and SHT7x series of humidity sensors, their interface specifications, the communication protocol used for transferring data in and out of the sensor, and the equations to convert their digital outputs to actual physical quantities.

Humidity and temperature measurements with Sensirion’s SHT1x/SHT7x sensors (Part 2)

These sensors are capable of measuring temperature along with relative humidity and provide outputs in fully-calibrated digital words. We will now see how a PIC microcontroller can be programmed to communicate with these sensors, read the temperature and relative humidity data, and display the information on a character LCD. Circuit setup on breadboard Circuit Diagram We will be interfacing the SHT11 and SHT75 sensors simultaneously to different port pins of PIC18F2550 and display the measured values of relative humidity and temperature from both on a 16×2 character LCD. Connecting a LCD and SHT sensors to StartUSB for PIC board Software Download complete mikroC project files Important note Output.

PulseIn. Reference Language | Libraries | Comparison | Changes Description Reads a pulse (either HIGH or LOW) on a pin.

PulseIn

For example, if value is HIGH, pulseIn() waits for the pin to go HIGH, starts timing, then waits for the pin to go LOW and stops timing. Returns the length of the pulse in microseconds. Gives up and returns 0 if no pulse starts within a specified time out. Secrets of Arduino PWM. Pulse-width modulation (PWM) can be implemented on the Arduino in several ways. This article explains simple PWM techniques, as well as how to use the PWM registers directly for more control over the duty cycle and frequency. This article focuses on the Arduino Diecimila and Duemilanove models, which use the ATmega168 or ATmega328. If you're unfamiliar with Pulse Width Modulation, see the tutorial. Briefly, a PWM signal is a digital square wave, where the frequency is constant, but that fraction of the time the signal is on (the duty cycle) can be varied between 0 and 100%.

PWM has several uses: Dimming an LED Providing an analog output; if the digital output is filtered, it will provide an analog voltage between 0% and 100% . Simple Pulse Width Modulation with analogWrite The Arduino's programming language makes PWM easy to use; simply call analogWrite(pin, dutyCycle), where dutyCycle is a value from 0 to 255, and pin is one of the PWM pins (3, 5, 6, 9, 10, or 11). SPI и Arduino: плодим входы / Arduino-мания :) SPI и Arduino: Теперь попробуем считать состояние нескольких кнопок через другой сдвиговый регистр, предназначенный для ввода — 74HC165, модель SN74HC165N от Texas Instruments. Этот регистр, в отличие от рассмотренного ранее 74HC595, работает наоборот — преобразует параллельный интерфейс в последовательный.

Но порядок работы немного другой: сначала дёргается линия SS вниз-вверх — состояния входов «защёлкиваются» во внутренний регистр, а уже потом идёт тактирование по SCLK и передача данных по MISO. Чтобы понять, как работает регистр, взглянем на его схему: Вход SH/L͞D (сдвиг/загрузка) управляет занесением состояний входов в триггеры — так называемой параллельной загрузкой: стоит прижать его к «земле», как состояние входов регистра будет подано на S-входы триггеров.

Чтобы отключить триггеры от входов регистра и иметь возможность читать из регистра, нужно установить SH/L͞D в 1. Интерфейс I2C / Коммуникации. Наконец, подобрались к I2C. Давно хотелось, но всё никак. Тема интересная, а возможности периферии общающейся по этому протоколу могут существенно расширить возможности микроконтроллерной системы. I2C, в отличии от , позволяет наращивать функционал, добавлять новые блоки без изменения в схеме и не задействуя новые выводы МК — настоящий конструктор — стыкуй что и сколько надо =) I2C (Inter-Integrated Circuit — примерно «Схема внутренней связи» =), читается “и-два-цэ” — последовательная шина выдуманная в недрах Philips ещё в 80-х годах прошлого века. Подключение трансивера на CC1101 к Arduino.