www.elektronik.si
Kaj trenutno počnem februar 2018
Pojdi na stran Prejšnja  1, 2, 3  Naslednja  :||:
www.elektronik.si -> Elektronika

Avtor: Jaka57Kraj: Grosuplje PrispevekObjavljeno: Ned Feb 11, 2018 9:46 pm    Naslov sporočila: icon_cool Re: Lepo narejeno
----------------------------------------------------------------------------
Branez je napisal/a:
Si to sam naredil ali ti je kdo pomagal?

Sam. Profile so po meri razrezali v Hypexu in vse potrebno zvrtali za spojnike.
Potem pa samo še sestaviš kot Lego kocke.
Zanimivo, da so profili cenejši kot pri .
1m profila 30x30 košta 6.1€ .
Najdražji so spojniki z obdelavo, 1 kos je 2.4€. Vendar se splača.
Tale okvir s spojniki in 60 maticami za v profile (kladivaste matice in kamni) me je vse skupaj koštalo 126€.
Naredijo pa v parih dnevih in pošljejo po hitri pošti.
Ni kaj izredno zadovoljen s prijaznostjo in ustrežljivostjo.

solomojster je napisal/a:
Tale pa ne bo škripal. Applause

Sicer tudi stari ne, ker imam Al mizo.

Ja in sedaj ponovno tiskanje, ker nisem natisnil pravilnih XY spojnikov, kar sem pogruntal šele, ko sem hotel pritrdit x nosilec glave Brick wall .
Pa sem mislil, da bo že danes zaštartala kinematika.
Pač ne bo, saj ne gori voda Very Happy .

Avtor: kose19Kraj: okolica Kobarida PrispevekObjavljeno: Pon Feb 12, 2018 11:15 pm    Naslov sporočila:  
----------------------------------------------------------------------------
Ali obstajajo kake knjižnice za tele Nextion displaye?

Avtor: Jaka57Kraj: Grosuplje PrispevekObjavljeno: Tor Feb 13, 2018 12:04 am    Naslov sporočila:  
----------------------------------------------------------------------------
kose19 je napisal/a:
Ali obstajajo kake knjižnice za tele Nextion displaye?

Obstajajo za Arduino, če si to mislil?

Avtor: kose19Kraj: okolica Kobarida PrispevekObjavljeno: Tor Feb 13, 2018 8:05 am    Naslov sporočila:  
----------------------------------------------------------------------------
Ja to sem mislil, hvala. Sicer arduino še tipam pa počasi bo že zalaufalo.

Avtor: mosqito PrispevekObjavljeno: Sre Feb 14, 2018 12:45 am    Naslov sporočila:  
----------------------------------------------------------------------------
Grem se pisanje driverjev za "žnj" senzorjev. Na sliki spodaj:

Senzorji, ki bodo na "vesoljski" strani:
1 - TMP75 (temperatura)
2 - SHT31 (RH, T)
3 - VEML6075 (UV)
4 - BME280 (p, T, RH)
5 - Si7013 (RH, T)

Senzorji, ki bodo v kapsuli:
6 - Si7013, MPU6050 (IMU), MAG3110 (kompas), TMP75, GPS

Komunikacija je LoRa.


Primer enega takega driverja:
Koda:
 /***
 *      ____    ____  _  ____   ____    ___   __  __
 *     / ___|  / ___|(_)|  _ \ |  _ \  / _ \ |  \/  |
 *     \___ \ | |    | || | | || |_) || | | || |\/| |
 *      ___) || |___ | || |_| ||  _ < | |_| || |  | |
 *     |____/  \____||_||____/ |_| \_\ \___/ |_|  |_|
 *        (C)2018 Scidrom
 
   Description: Si7013 driver
   License: GNU General Public License
   Maintainer: S54MTB
*/

/******************************************************************************
  * @file    SI7013.c
  * @author  S54MTB
  * @version V1.0.0
  * @date    12-January-2018
  * @brief   MAG3110 driver
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2018 Scidrom
   * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
   *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>. 
  ******************************************************************************
  */
/**!
  * Uncoment to use osDelay() instead of HAL_Delay()
   */
#define USE_OS_DELAY 1

#include "si7013.h"

#ifdef USE_OS_DELAY
   #include "cmsis_os2.h"                  // ::CMSIS:RTOS2
#endif



/**!
  * Si7013 user registers
   */
si7013_userReg_t si7013_userRegs;


/*
 * si7013_read_reg() - Read User register
 * @hi2c:  handle to I2C interface
 * @reg: Register read command
 * @val: 8-bit register value from the Si7013
 * Returns HAL status or HAL_ERROR for invalid parameters.
 */
HAL_StatusTypeDef si7013_read_reg(I2C_HandleTypeDef *hi2c,
                  uint8_t adr, uint8_t reg, uint8_t *val)
{
   uint8_t buf[2];
   HAL_StatusTypeDef  error;


   // Check argument
   if ((reg != SI7013_CMD_READ_REGISTER_1) &
        (reg != SI7013_CMD_READ_REGISTER_2) &
       (reg != SI7013_CMD_READ_REGISTER_3) )
      return HAL_ERROR;
   
   buf[0] = reg;
   /* Read user register */
   /* Send the command */
   error = HAL_I2C_Master_Transmit(hi2c,adr<<1,buf,1,100);
   if (error != HAL_OK)
      return error;

#ifdef USE_OS_DELAY
  osDelay(5);
#else   
   HAL_Delay(5);
#endif
   
   /* Receive a 1-byte result */
   error = HAL_I2C_Master_Receive(hi2c, adr<<1 | 0x01, buf, 1, 1000);
   if (error != HAL_OK)
      return error;
   
   /* Result */
   *val = buf[0];

   return HAL_OK;  /* Success */
   
}


/*
 * si7013_write_reg() - Read User register
 * @hi2c:  handle to I2C interface
 * @reg: Register read command
 * @val: 8-bit register value from the Si7013
 * Returns HAL status or HAL_ERROR for invalid arguments.
 */
HAL_StatusTypeDef si7013_write_reg(I2C_HandleTypeDef *hi2c,
            uint8_t adr, uint8_t reg, uint8_t val)
{
   uint8_t buf[2];
   HAL_StatusTypeDef  error;

      // Check argument
   if ((reg != SI7013_CMD_WRITE_REGISTER_1) &
        (reg != SI7013_CMD_WRITE_REGISTER_2) &
       (reg != SI7013_CMD_WRITE_REGISTER_3) )
      return HAL_ERROR;

   buf[0] = reg;
   buf[1] = val;
   /* Write user register */
   /* Send the command and data */
   error = HAL_I2C_Master_Transmit(hi2c,adr<<1,buf,2,100);
   if (error != HAL_OK)
      return error;

   return HAL_OK;  /* Success */
   
}



/*
 * si7013_read_regs() - Read User registers
 * @hi2c:  handle to I2C interface
 * regs: register file
 * Returns HAL status
 */
HAL_StatusTypeDef si7013_read_regs(I2C_HandleTypeDef *hi2c,
                        uint8_t adr, si7013_userReg_t *Regs)
{
   HAL_StatusTypeDef  error;
   uint8_t r;

   error = si7013_read_reg(hi2c, adr, SI7013_CMD_READ_REGISTER_1, &r);
   if (error != HAL_OK) return error;
   Regs->reg1.r = r;
   
   error = si7013_read_reg(hi2c, adr, SI7013_CMD_READ_REGISTER_2, &r);
   if (error != HAL_OK) return error;
   Regs->reg2.r = r;

   error = si7013_read_reg(hi2c, adr, SI7013_CMD_READ_REGISTER_3, &r);
   if (error != HAL_OK) return error;
   Regs->reg3.r = r;

   return HAL_OK;  /* Success */
   
}



/*
 * si7013_write_regs() - Write User registers
 * @hi2c:  handle to I2C interface
 * regs: register file
 * Returns HAL status
 */
HAL_StatusTypeDef si7013_write_regs(I2C_HandleTypeDef *hi2c,
                        uint8_t adr, si7013_userReg_t *Regs)
{
   HAL_StatusTypeDef  error;
   uint8_t r;

   r = Regs->reg1.r;
   error = si7013_write_reg(hi2c, adr, SI7013_CMD_WRITE_REGISTER_1, r);
   if (error != HAL_OK) return error;

   r = Regs->reg2.r;
   error = si7013_write_reg(hi2c, adr, SI7013_CMD_WRITE_REGISTER_2, r);
   if (error != HAL_OK) return error;

   r = Regs->reg3.r;
   error = si7013_write_reg(hi2c, adr, SI7013_CMD_WRITE_REGISTER_3, r);
   if (error != HAL_OK) return error;
   

   return HAL_OK;  /* Success */
   
}




/*
 * si7013_measure() - Take a measurement
 * @hi2c:  handle to I2C interface
 * @command: Command for measuring temperature or humidity
 * @val: 16-bit value from the Si7013
 * Returns HAL status.
 */
HAL_StatusTypeDef si7013_measure(I2C_HandleTypeDef *hi2c, uint8_t adr,
                           uint8_t command, uint16_t *val)
{
   uint8_t buf[2];
   HAL_StatusTypeDef  error;


   buf[0] = command;
   /* Measure the humidity or temperature value */
   /* Send the command */
   error = HAL_I2C_Master_Transmit(hi2c,adr<<1,buf,1,100);
   if (error != HAL_OK)
      return error;

#ifdef USE_OS_DELAY
  osDelay(15);
#else   
   HAL_Delay(15);
#endif
   
   /* Receive the 2-byte result */
   error = HAL_I2C_Master_Receive(hi2c, adr<<1 | 0x01, buf, 2, 1000);
   if (error != HAL_OK)
      return error;

   
   /* Swap the bytes and clear the status bits */
   *val = buf[0] * 256 + buf[1] & ~3;

   return HAL_OK;  /* Success */
   
}


/*
 * si7013_measure_intemperature() - internal temperature measurement
 * @hi2c:  handle to I2C interface
 * @temperature:  (signed) 32 bit temperature result, unit is m°C
 * Returns HAL status.
 */
HAL_StatusTypeDef si7013_measure_intemperature(I2C_HandleTypeDef *hi2c, 
         uint8_t adr,    int32_t *temperature)
{
   uint16_t value;
   HAL_StatusTypeDef  error;

   /* Measure the temperature value */
   error = si7013_measure(hi2c, adr, SI7013_CMD_MEASURE_TEMPERATURE_HOLD, &value);
   if (error != HAL_OK)
      return error;

   /* Convert the value to millidegrees Celsius */
   *temperature = ((value*21965)>>13)-46850;

   return HAL_OK;
}


/*
 * si7013_measure_thermistor() - external temperature measurement
 * @hi2c:  handle to I2C interface
 * @value:  (signed) 16 bit conversion result
 * Returns HAL status.
 */
HAL_StatusTypeDef si7013_measure_thermistor(I2C_HandleTypeDef *hi2c, 
                              uint8_t adr, int16_t *value)
{
   HAL_StatusTypeDef  error;
  uint16_t v;
   
   /* Measure the temperature value */
   error = si7013_measure(hi2c, adr, SI7013_CMD_MEASURE_THERMISTOR_HOLD, &v);
   if (error != HAL_OK)
      return error;

   *value = (int16_t)v;

   return HAL_OK;
}



/*
 * si7013_measure_humidity() - internal temperature measurement
 * @hi2c:  handle to I2C interface
 * @temperature:  (signed) 32 bit humidity result, unit is mRH%
 * Returns HAL status.
 */
HAL_StatusTypeDef si7013_measure_humidity(I2C_HandleTypeDef *hi2c,  uint8_t adr,
   int32_t *humidity)
{
   uint16_t value;
   HAL_StatusTypeDef  error;
   int32_t rh;

   /* Measure the temperature value */
   error = si7013_measure(hi2c, adr, SI7013_CMD_MEASURE_HUMIDITY_HOLD, &value);
   if (error != HAL_OK)
      return error;

   /* Convert the value to milli-percent (pcm) relative humidity */
   rh = ((value*15625)>>13)-6000;

   /* Limit the humidity to valid values */
   if (rh < 0)
      *humidity = 0;
   else if (rh > 100000)
      *humidity = 100000;
   else
      *humidity = rh;      

   return HAL_OK;
}


/*
 * si7013_get_device_id() - Get the device ID from the device
 * @i2c: handle to I2C interface
 * @id: pointer to device ID
 *
 * Returns 0 on success.
 */
HAL_StatusTypeDef si7013_get_device_id(I2C_HandleTypeDef *hi2c,  uint8_t adr,
                           uint8_t *id)
{
   uint8_t buf[6];
   HAL_StatusTypeDef  error;

   /* Put the 2-byte command into the buffer */
   buf[0] = 0xFC;
   buf[1] = 0xC9;

   /* Send the command */
   error = HAL_I2C_Master_Transmit(hi2c,adr<<1,buf,2,100);
   if (error != HAL_OK)
          return error;

   /* Receive the 6-byte result */
   error = HAL_I2C_Master_Receive(hi2c, adr<<1 | 0x01, buf, 6, 100);
   if (error != HAL_OK)
          return error;

   /* Return the device ID */
   *id = buf[0];
   
   return HAL_OK;  /* Success */
}

/************ EOF *************************************************************/


Avtor: Jaka57Kraj: Grosuplje PrispevekObjavljeno: Sre Feb 14, 2018 1:06 am    Naslov sporočila:  
----------------------------------------------------------------------------
Kinematiko sem preizkusil, dela BP Dancing .
Jutri me pa čaka rezkanje osnovne plošče za ogrevalno mizo.


Počasi bo že, kanede Very Happy .

Avtor: solomojsterKraj: NOVA GORICA PrispevekObjavljeno: Sre Feb 14, 2018 7:09 am    Naslov sporočila:  
----------------------------------------------------------------------------
Nekaj ne štima. Confused Zgleda preveč popolno. Anxious


Avtor: MadMax PrispevekObjavljeno: Sre Feb 14, 2018 11:49 am    Naslov sporočila:  
----------------------------------------------------------------------------
Po Murphyju gre nekako tako, da če se zdi da je vse popolno, si nekaj spregledal Laughing

Avtor: mosqito PrispevekObjavljeno: Sre Feb 14, 2018 12:34 pm    Naslov sporočila:  
----------------------------------------------------------------------------
Še boš razdiral. Kje so lagerji za Z os? Confused

Avtor: Jaka57Kraj: Grosuplje PrispevekObjavljeno: Sre Feb 14, 2018 2:39 pm    Naslov sporočila:  
----------------------------------------------------------------------------
mosqito je napisal/a:
Še boš razdiral. Kje so lagerji za Z os? Confused
Lagerji so tamal problem, saj še osnovne mize ni.
Vsako vodilo potrebuje samo štiri vijake, da ga vzameš ven.
Manjkajo še dve navojni vreteni spredal in linearni steper zadaj na sredini.
Kakor sem že napisal, počasi se žaba dere Very Happy .

Avtor: BranezKraj: Koprivnica HR PrispevekObjavljeno: Ned Feb 25, 2018 12:24 pm    Naslov sporočila:  AD9835 DDS VFO
----------------------------------------------------------------------------
Pred leti, ko sem delal SDR sprejemnik, mi je ostalo nekaj kosov AD9835BRU. Da se ne zaprašijo preveč sem naredil VFO do 16MHz z Arduinom. Embarassed

Čakam še na , da mi naredijo tiskanine.

Mogoče bom z njim naredil še kak QRP za 60m band.

Avtor: frenkiKraj: Ljubljana (JN76GB) PrispevekObjavljeno: Ned Feb 25, 2018 1:18 pm    Naslov sporočila:  
----------------------------------------------------------------------------
Brane čisto napačen način gradnje Rolling Eyes ... ravno sem naletel na enega dinozavra, ki lepo prikazuje način, kako se tem stvarem streže. Toliko bi pa že lahko bil v toku, da bi vedel, da je tovrstni način gradnje pri nas spet in. Whistle Ne pa tole kar se ti greš.

Avtor: BranezKraj: Koprivnica HR PrispevekObjavljeno: Ned Feb 25, 2018 1:23 pm    Naslov sporočila:  
----------------------------------------------------------------------------
Bodi srečen, da nisem dal slike prototipa na perforirani pertinaks ploščici. d'oh!

V stilu: "zunaj uj, notri fuj". Mr. Green

Avtor: Bizgec65Kraj: Trebnje PrispevekObjavljeno: Ned Feb 25, 2018 3:30 pm    Naslov sporočila:  
----------------------------------------------------------------------------
Kaj trenutno počnem?
Seksam, ni ravno trenutno, s kratkimi pavzami že od sinoči Mr. Green .

Oz. sem trenutno "jebena" stranka.
Sinoči sem nekaj brskal po internetuspletu za izdelavo obratomerja, ampak takega, da je na ledice, ne številčni na display, za v Xsaro Picasso, pa klik sem, klik tja, klik kar tako in VOILA, skoraj čez cel ekran rdeče okno: WARNING....your computer bla, bla bla...ne ugašaj, ne resetiraj itd.
Veš da, takoj sem izklopil povezavo v svet in ugasnil kišto, poizkusil na system restore na nek datum...
Saj vse dela, le chrome ne gre zagnati, ne gre chrome cleanup, ne gre chrome na novo inštalirat, na IE mi pa ni za delati, pa še vse možne zaznamke sem izgubil.
What to do, what to do? Cool

Avtor: Jaka57Kraj: Grosuplje PrispevekObjavljeno: Ned Feb 25, 2018 3:48 pm    Naslov sporočila:  
----------------------------------------------------------------------------
frenki je napisal/a:
Brane čisto napačen način gradnje Rolling Eyes ... ravno sem naletel na enega dinozavra......
Storno CQF6xx?

Stran 2 od 3

Powered by phpBB © 2001,2002 phpBB Group