Jump to content

seraph333

Members
  • Posts

    10
  • Joined

  • Last visited

seraph333's Achievements

Member

Member (2/4)

0

Reputation

  1. Hi, Fausto, I did the command, both with and without jumper, with found the eeprom at address 1, without found the eeprom at address 0.
  2. Hi, Fausto, Thanks for your response. I don't have other third-party HAT, but this MCC152 on the RPI 2. I don't have any history about this RPI 2, other than it is new, but left in the lab for quite a long time. My RPI 4 is used on other project, this MCC 152 HAT is pulled out from that project. Since it can be recognized at address 1, can address 0 been left out without any board?
  3. Hi, I have a Raspberry pi 2, and a MCC 152. The RPI is showing a board at address 0, but not able to list the device, the MCC 152 is not found. The MCC 152 was function at my Raspberry Pi 4. When I place the jumper at A0, the MCC 152 now is found at address 1, but isn't the manual says "There must always be a board at address 0" So why the single board MCC152 cannot be found at address 0?
  4. First: except (HatError, ValueError) as error: ^ SyntaxError: invalid syntax
  5. Thanks, Jeffrey, I appreciate for the material you provided. It's just at this stage I don't have that much time to start from beginning. I am strong on mechanical design side but not software. I am trying to use all the AO to control a LED array. Tried to modify the codes, but error just popup here and there, following is the code I am struck with, any little help to me is big. def main(): options = OptionFlags.DEFAULT channels = (0,1) hat0 = mcc152(0) hat1 = mcc152(1) hat2 = mcc152(2) for channel in channels: hat0.a_out_write_all(channel, get_input_values) hat1.a_out_write_all(channel, get_input_values) hat2.a_out_write_all(channel, get_input_values) address = select_hat_device(HatIDs.MCC_152) run_loop = True error = False while run_loop and not error: try: values = get_input_values() except ValueError: run_loop = False else: # Write the values. for hat in range(3): print(' ', hat, end='') if hat == 0: for channel in channels: hat.a_out_write_all(values=values, options=options) elif hat == 1: for channel in channels: hat.a_out_write_all(values=values, options=options) else: for channel in channels: hat.a_out_write_all(values=values, options=options) except (HatError, ValueError): error = True if __name__ == '__main__': # This will only be run when the module is called directly. main()
  6. Thanks, Jeffrey. Please excuse me as a newbie for python and Raspberry pi. I try to write all analog out for 3 MCC 152 HAT, but there always problems to execute. Can you please help? I have the file I modified attached. Thanks a lot. analog_output_write_allx3.py
  7. Thanks, Jeffrey. I should rephrase as how can I define the raspberry pi to give the MCC 152 a digital signal to output voltage. I also has three MCC 134 HATs to take 6 thermocouples temperature, ADC to raspberry pi, compare with the input temperature, then use MCC 152 DAC to control power supply. What is the code on raspberry pi to read the 6 thermocouples temperature? What is the code to give MCC 152 the signal. Thanks a lot.
  8. I have two MCC 134 HATs on raspberry pi 4 for 6 thermocouple input, and three MCC 152 HATs for 6 AO to control the power supply. What is the code to write on raspberry pi for the MCC 152 HATs voltage input and output?
  9. Thanks, Jeffrey. Another question is for the delay_between_reads = 1. Is that possible to set it to less than 1 second? Such as 0.1 second? Or even without delay. Because the thermocouple input is going to compare with the set point then do PID control, to control a heater, the whole heating process supposed to less than 30 seconds. If every time it take 8 seconds to get the input, not sure the correction will be made within 3 loops.
  10. Hi, I connect two MCC 134 HAT on Raspberry Pi, I need 8 thermocouples input at the same time. What is the python code to address both Channel/HAT and input eight temperature? Thanks,
×
×
  • Create New...