how to interface i2c slave

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
BMP
Offline
Last seen:2 months 2 weeks ago
Joined:2020-07-20 06:06
how to interface i2c slave

Hi Dialog,

i am using DA14531MOD-00DEVKIT and i am using da14531 daughter board. and i want to interface and i2c temp slave and send it to mobile so any suggestions on how to da that

PM_Dialog
Offline
Last seen:3 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi There,

Hi There,

Thanks for your question online. Changing the device selection from DA14580 (initial) to DA14531.

Please take a look at theDA14531-DA14585-586 Reading I2C Accelerometer BLESW Example. This example shows how to acquire data from an I2C accelerometer and send the measurements with BLE notifications using a DA14531 or DA14585/586 device.

Please follow theSoftware Example Setup Using Python Link Scriptdocument for the initial setup, as all our SW Examples include only the application file – they should be linked with the SDK first.

Generally, we have great variety of SW Examples and tutorial that will help you to get stated. Please visit the DA14531 product page :

//www.xmece.com/products/connectivity/bluetooth-low-energy/products/da14531

FYI - there also reference designs that you will help you to reduce the developing stage, as you don’t need to spend so much time in developing your application code.

CodeLes

The CodeLess allows you to quickly get started with wireless IoT applications with a set of AT Commands. The CodeLess AT commands platform allows control over a local UART connected device as well as a remote device via BLE. You can create simple demos / applications / proof of concepts without any code development or build you own application on top!

//www.xmece.com/products/smartbond-codeless-commands

Dialog Serial Port Service (DSPS)

The DSPS emulates a serial cable communication. It provides a simple substitute for RS-232 connections, including the familiar software flow control logic via Bluetooth low energy. The SPS software distribution includes the application and profile source codes and supports GAP Central/Peripheral roles.

//www.xmece.com/products/dialog-serial-port-service-dsps

Thanks, PM_Dialog

lukasz.wojnarowski
Offline
Last seen:5 months 1 day ago
Joined:2020-07-23 09:28
Hi Dialog,

Hi Dialog,

My python script is not working: there is no scatterfile_common.sct in 6.0.14.1114 SDK

FileNotFoundError: [Errno 2] No such file or directory: '..\\..\\sdk\\common_project_files\\scatterfiles\\scatterfile_common.sct'

Regards,

Lucas

BMP
Offline
Last seen:2 months 2 weeks ago
Joined:2020-07-20 06:06
HI Dialog, thankyou for your

HI Dialog, thankyou for your information it helped but for me i am facing issue with how to transmit and receive data through api's

i2c_master_transmit_buffer_sync()

i2c_master_receive_buffer_sync()

as my slave requires two adresses one is slave adress and next one is memory adress for getting me data i have to implement a repeated start conditon. which i am unable to implemnt using above two api's is there any other api for this conditon.

Thanks in advance,

PM_Dialog
Offline
Last seen:3 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi Lucas,

Hi Lucas,

Probably the SW Example includes an old python script - I will ask the Team internally to change it. Please follow the steps below :

  1. Download theDA14585/DA14586 - DA14531 Multiperipheral Example
  2. Copy the DA14531- DA14585-586_Multiperipheral_Example\project_environment\dlg_make_keil5_env_v2.000.py and past it into da14531-da14585-586_reading_i2c_accelerometer_ble\project_environment
  3. The execute the new python script :

> python dlg_make_keil5_env_v2.000.py -sdkpath “

For instance:

> python dlg_make_keil5_env_v2.000.py -sdkpath “C:\dev\6.0.12”

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:3 days 8 hours ago
Staff
Joined:2018-02-08 11:03
Hi BMP,

Hi BMP,

谢谢你接受我的答案。你的意思是如何transit data over the air? Please check user_svc1_accel_Y_send_ntf() for instance.

Thanks, PM_Dialog

BMP
Offline
Last seen:2 months 2 weeks ago
Joined:2020-07-20 06:06
hi dialog , thanks for

hi dialog , thanks for support my issue has been resolved but i now have another one , i must configure my device to sleep but unable to configure it . even if added below snippet in userconfig.h it is still consuming 300micro amperes.

const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_OTP_COPY_ON;

这是唯一的变化给我做参考吗project is ble_measuring temprature from dialog example site

    PM_Dialog
    Offline
    Last seen:3 days 8 hours ago
    Staff
    Joined:2018-02-08 11:03
    Hi BMP,

    Hi BMP,

    Glad that you figured your issue out. Regarding your follow up question, please refer to theDA14531 Sleep Mode Tutorial (HTML).

    Thanks, PM_Dialog