Окт 272016
 

987654321

  • 10DOF modules (three-axis gyroscope + triaxial accelerometer and three-axis magnetic field + atmospheric pressure)
  • Means of communication: IIC Communication protocol(fully compatible with 3-5V system containing LLC circuit)
  • Acceleration,Gyroscope and magnetometer
  • chip:MPU6050+HMC5883+BMP180
  • power supply :3.3V-5V
  • size:2.2cmx1.7cm

qwertyuiop 1234567890

Описание.

Для включения компаса HMC5883L нужно следующие.
// Bypass Mode
Wire.beginTransmission(0x68); // Address of MPU5060
Wire.write(0x37);
Wire.write(0x02);
Wire.endTransmission();

Wire.beginTransmission(0x68);
Wire.write(0x6A);
Wire.write(0x00);
Wire.endTransmission();

// Disable Sleep Mode
Wire.beginTransmission(0x68);
Wire.write(0x6B);
Wire.write(0x00);
Wire.endTransmission();

Авг 182015
 

oled-dimension

oled-main

Разрешение: 128*64
Угол обзора: > 160 градусов
Ультра-низким энергопотреблением: 0.08 Вт
Рабочее напряжение: 3-5 Вольт
Рабочая температура: от-30 до 70 градусов Цельсия
Размер: 27.0 мм * 27.0 мм * 4.1 мм
I2c/интерфейс
SSD1306

Arduino Library. (backup download:OLED_I2C)

SPI

oled128x64spi

Библиотеки для микроконтроллеров (Arduino, и.т.д.)

u8glib — https://code.google.com/p/u8glib/

Для Arduino

D/C =>11, RST=>13,SDA=>9,SCL=10

U8GLIB_SSD1306_128X64 u8g(10, 9, 12, 11,13);

12=Не подключаем.

VCC = 3.3v !!! ( На этом модуле нет преобразователя 3.3в )

U8GLIB_SSD1306_128X64 u8g(10,9,12,11,13); // Arduino Fio

 Posted by at 15:47  Tagged with:
Дек 152014
 

mx-05v+mx-fs-03v

Приемник:

Model: MX-05V
Working voltage: 5V DC quiescent current: 4mA
Receiver Frequency: 433.92MHZ
Receiver sensitivity:-105DB
Size: 30 * 14 * 7mm

MX-FS-03V

Передатчик:

Model: MX-FS-03V
Transmission Distance :20-200 m (dependent on supply voltage)
Operating Voltage :3.5-12V
Dimensions: 19 * 19mm
AM transfer rate: 4KB / S
Transmission power: 10mW
Emission frequency: 433M

MX-05V

 

 Posted by at 12:41
Окт 272014
 

Library for Arduino 1.0.3
LCD_Library

Library for Arduino 1.05

При инициализации экрана необходимы вот эти строчки.

lcd.init(EPSON);
lcd.contrast(44); 

ColorLCDShield-master

Color LCD Shield (SparkFun)

Color LCD Shield (SparkFun)

Описание

ColorLCDShield

Для AtMega 1284p


*.h
#else
	
	#define LCD_PIN_RES			2 // 26		// D8
	#define LCD_PIN_CS			3 // 27		// D9
	#define LCD_PIN_DIO			5		// D11
	#define LCD_PIN_SCK			7		// D13


	#define	LCD_PORT_CS		PORTA
	#define	LCD_PORT_SCK		PORTB
	#define	LCD_PORT_RES		PORTA
	#define	LCD_PORT_DIO		PORTB
#endif

И вот это в *.cpp

DDRB = ((1<<LCD_PIN_DIO)|(1<<LCD_PIN_SCK));  
DDRA = ((1<<LCD_PIN_CS)|(1<<LCD_PIN_RES));

 Posted by at 16:38
Окт 242014
 

Описание модуля. 

Часы, термометр, eeprom. i2c

Часы, термометр, eeprom. i2c

Схема модуля

В данном модуле должна быть установлена НЕ БАТАРЕЙКА а аккумулятор LIR2032 3.6v, в противном случаи часы не будут сохраняться после отключения питания. Короче барахло китайское.

 Posted by at 10:54
Ноя 082013
 

hc-sr04-500x500

Пример:

// ---------------------------------------------------------------------------
// This example code was used to successfully communicate with 15 ultrasonic sensors. You can adjust
// the number of sensors in your project by changing SONAR_NUM and the number of NewPing objects in the
// "sonar" array. You also need to change the pins for each sensor for the NewPing objects. Each sensor
// is pinged at 33ms intervals. So, one cycle of all sensors takes 495ms (33 * 15 = 495ms). The results
// are sent to the "oneSensorCycle" function which currently just displays the distance data. Your project
// would normally process the sensor results in this function (for example, decide if a robot needs to
// turn and call the turn function). Keep in mind this example is event-driven. Your complete sketch needs
// to be written so there's no "delay" commands and the loop() cycles at faster than a 33ms rate. If other
// processes take longer than 33ms, you'll need to increase PING_INTERVAL so it doesn't get behind.
// ---------------------------------------------------------------------------
#include "NewPing.h"

#define SONAR_NUM     8 // Number or sensors.
#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping.
#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor echo).

unsigned long pingTimer[SONAR_NUM]; // Holds the times when the next ping should happen for each sensor.
unsigned int cm[SONAR_NUM];         // Where the ping distances are stored.
uint8_t currentSensor = 0;          // Keeps track of which sensor is active.

NewPing sonar[SONAR_NUM] = {       //   Sensor object array. Each sensor's trigger pin, echo pin, and max distance to ping.
  NewPing(50, 51, MAX_DISTANCE),   // 1
  NewPing(52, 53, MAX_DISTANCE),   // 2
  NewPing(38, 37, MAX_DISTANCE),   // 3
  NewPing(40, 39, MAX_DISTANCE),   // 4
  NewPing(33, 34, MAX_DISTANCE),   // 5
  NewPing(35, 36, MAX_DISTANCE),   // 6
  NewPing(24, 25, MAX_DISTANCE),   // 7
  NewPing(26, 27, MAX_DISTANCE),   // 8
};

void setup() {
  
  Serial1.begin(115200);
  
  pingTimer[0] = millis() + 75;           // First ping starts at 75ms, gives time for the Arduino to chill before starting.

  for (uint8_t i = 1; i < SONAR_NUM; i++) // Set the starting time for each sensor.
    pingTimer[i] = pingTimer[i - 1] + PING_INTERVAL;
}

void loop() {
  
  for (uint8_t i = 0; i < SONAR_NUM; i++) {       // Loop through all the sensors.
    if (millis() >= pingTimer[i]) {               // Is it this sensor's time to ping?
      pingTimer[i] += PING_INTERVAL * SONAR_NUM;  // Set next time this sensor will be pinged.
      if (i == 0 && currentSensor == SONAR_NUM - 1) oneSensorCycle(); // Sensor ping cycle complete, do something with the results.
      sonar[currentSensor].timer_stop();          // Make sure previous timer is canceled before starting a new ping (insurance).
      currentSensor = i;                          // Sensor being accessed.
      cm[currentSensor] = 0;                      // Make distance zero in case there's no ping echo for this sensor.
      sonar[currentSensor].ping_timer(echoCheck); // Do the ping (processing continues, interrupt will call echoCheck to look for echo).
    }
  }
  // The rest of your code would go here.
}

void echoCheck() { // If ping received, set the sensor distance to array.
  if (sonar[currentSensor].check_timer())
    cm[currentSensor] = sonar[currentSensor].ping_result / US_ROUNDTRIP_CM;
}

void oneSensorCycle() { // Sensor ping cycle complete, do something with the results.

  for (uint8_t i = 0; i < SONAR_NUM; i++) {
    Serial1.print(i);
    Serial1.print("=");
    Serial1.print(cm[i]);
    Serial1.print("cm ");
  }

  Serial1.println();
}
 Posted by at 23:40