Skip to content

Channel 1 readings duplicated #1

@MFernandezCarmona

Description

@MFernandezCarmona

Hi,
I was testing your awesome code to read EMG data from the Shimmer, but it seems to be reading channel 1 two times. This is the code I'm running, and it's always printing 0 (so both values from the packet are equal):

`TYPE = util.SHIMMER_ExG_0
PORT = "COM27"

shimmer_dev = shimmer.Shimmer3(TYPE, debug=False)
shimmer_dev.connect(com_port=PORT, write_rtc=True, update_all_properties=False, reset_sensors=True)

shimmer_dev.set_sampling_rate(1024.0)
shimmer_dev.set_enabled_sensors(util.SENSOR_ExG1_24BIT)
shimmer_dev.exg_send_emg_settings(util.ExG_GAIN_12)
shimmer_dev.print_object_properties()

shimmer_dev.start_bt_streaming()

try:
while True:
n_of_packets, packets = shimmer_dev.read_data_packet_extended(calibrated=True)
#[timestamp, timeRTCstart, timeRTCcurrent, SENSOR_ExG1_24BIT channel 1, SENSOR_ExG1_24BIT channel 2]
# 0 1 2 3
if n_of_packets > 0:
for packet_i in packets:
print(packet_i[3]-packet_i[4])
print()
except KeyboardInterrupt:
shimmer_dev.stop_bt_streaming()
shimmer_dev.disconnect(reset_obj_to_init=True)
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions