Attiny : arduino's little brother Arduino is a very good card but if you need a very smaller card size or if you don't need alls pins and less memory, Attiny is a good alternative VCC =Voltage is 2.7-5.5 v Notice : Pins output high voltage is 4.3 volts with a Vcc of 5 volts. For 3.3 Vcc, pins o utput voltage is 2.5 V So be carefull, this is not 3.3 volts like Arduino How to program Attiny To program attiny, just use Arduino IDE. To do this, you will have to connevt Attiny to arduino. Arduino will now be used as bridge Initial step Upload ArduinoISP sketch on your arduino : Select card Arduino Uno Load sketch Samples > 11.ArduinoISP Tips : be sure to unplug all wires before to upload the sketch First step First time and only once, you have to write bootloader on Attiny : Choose 'Arduino as ISP' as the programmer prior to burning the Arduino bootloader onto the ATtiny Select card ATtinyXX Verify Board Properties...
Si7021 Sensor for measuring humidity and temperature The Si7021 Sensor integrates humidity and temperature sensor elements, an analog-to-digital converter, signal processing, calibration data, and an I2C Interface. The Si7021 offers an accurate, low-power, factory-calibrated digital solution ideal for measuring humidity and temperature Features Precision Relative Humidity Sensor ± 3% RH (max), 0–80% RH High Accuracy Temperature Sensor ±0.4 °C (max), –10 to 85 °C 0 to 100% RH operating range Up to –40 to +125 °C operating range Wide operating voltage – (1.9 to 3.6 V) Low Power Consumption – 150 μA active current How to wire https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide/all Library https://github.com/adafruit/Adafruit_Si7021/blob/master/examples/si7021/si7021.ino#L36
Today I have mounted my Raspberry Zero W on my QuadCopter If it works it will lighten the total weight of the Quadcopter because the Zero weighs only 9 grams! On the other hand, Raspberry Zero is much less powerful than my Raspberry 2 ... The big problem was ServoBlaster Like RPIO, this library did not want to run on a Raspberry Zero!?! So, I tested pigpio and miracle, it works! Then, I see the pigiod daemon consumes a little too much cpu ... Consumption 7.1% .... Gloups .... I thought it was hardware. I'll analyze that later Here is my python code : import time import pigpio SERVO = 4 pi = pigpio . pi() # Connect to local Pi. print ( "start" ) pi . set_PWM_frequency(SERVO, 50 ) pi . set_servo_pulsewidth(SERVO, 1000 ) # Minimum throttle. print (pi . get_PWM_frequency( 17 )) raw_input ( "Press Enter to 1100..." ) pi . set_servo_pulsewidth(SERVO, 1200 ) # Minimum throttle. raw_input ( "Press Enter to end..." ) pi . s...
Commentaires
Enregistrer un commentaire