From a9537a0d3e99ceaad4f9ad0db875c73a1647cbc2 Mon Sep 17 00:00:00 2001 From: OpenElectrons Date: Wed, 25 Feb 2015 13:04:27 -0500 Subject: [PATCH] first commit --- BaseI2CDevice.cpp | 295 +++ BaseI2CDevice.h | 214 +++ EVShield.cpp | 895 +++++++++ EVShield.h | 762 ++++++++ EVShieldAGS.cpp | 76 + EVShieldAGS.h | 60 + EVShieldI2C.cpp | 173 ++ EVShieldI2C.h | 140 ++ EVShieldUART.cpp | 172 ++ EVShieldUART.h | 81 + .../AngleSensor/AngleSensor.ino | 108 ++ .../AngleSensor_SerialMonitor_example.txt | 7 + EVShield_examples/DistNx/DistNx.ino | 111 ++ .../LSArray_example/LSArray_example.ino | 101 ++ .../LineLeader_example/LineLeader_example.ino | 98 + .../NXTCam_blobs/NXTCam_blobs.ino | 130 ++ .../NXTCurrentMeter/NXTCurrentMeter.ino | 111 ++ .../NXTCurrentMeterRefSet.ino | 80 + .../NXTVoltMeter/NXTVoltMeter.ino | 111 ++ .../NXTVoltMeterRefSet/NXTVoltMeterRefSet.ino | 80 + EVShield_examples/NumericPad/NumericPad.ino | 85 + .../PiLight_demo/PiLight_demo.ino | 115 ++ EVShield_examples/bump_count/bump_count.ino | 93 + EVShield_examples/ev3_gyro/ev3_gyro.ino | 100 + .../ev3_infrared/ev3_infrared.ino | 109 ++ EVShield_examples/ev3_touch/ev3_touch.ino | 135 ++ .../ev3_ultrasonic/ev3_ultrasonic.ino | 121 ++ .../motor_and_touch/motor_and_touch.ino | 135 ++ .../motor_rotations/motor_rotations.ino | 212 +++ .../multi_color_led/multi_color_led.ino | 78 + EVShield_examples/nxt_color/nxt_color.ino | 98 + EVShield_examples/nxt_light/nxt_light.ino | 106 ++ EVShield_examples/nxt_touch/nxt_touch.ino | 109 ++ .../print_bank_info/print_bank_info.ino | 126 ++ .../rc_servo_with_buttons.ino | 69 + .../shield_buttons/shield_buttons.ino | 90 + EVShield_examples/sumo_eyes/sumo_eyes.ino | 140 ++ .../tank_drive_with_pspnx.ino | 147 ++ EVs_AbsoluteIMU.cpp | 90 + EVs_AbsoluteIMU.h | 160 ++ EVs_AngleSensor.cpp | 50 + EVs_AngleSensor.h | 64 + EVs_DISTNx.cpp | 66 + EVs_DISTNx.h | 70 + EVs_EV3Color.cpp | 37 + EVs_EV3Color.h | 49 + EVs_EV3Gyro.cpp | 47 + EVs_EV3Gyro.h | 52 + EVs_EV3Infrared.cpp | 52 + EVs_EV3Infrared.h | 58 + EVs_EV3Touch.cpp | 44 + EVs_EV3Touch.h | 56 + EVs_EV3Ultrasonic.cpp | 46 + EVs_EV3Ultrasonic.h | 52 + EVs_LightSensorArray.cpp | 105 ++ EVs_LightSensorArray.h | 100 + EVs_LineLeader.cpp | 205 +++ EVs_LineLeader.h | 194 ++ EVs_MagicWand.cpp | 34 + EVs_MagicWand.h | 42 + EVs_NXTCam.cpp | 139 ++ EVs_NXTCam.h | 126 ++ EVs_NXTColor.cpp | 115 ++ EVs_NXTColor.h | 66 + EVs_NXTCurrentMeter.cpp | 57 + EVs_NXTCurrentMeter.h | 60 + EVs_NXTLight.cpp | 39 + EVs_NXTLight.h | 46 + EVs_NXTMMX.cpp | 417 +++++ EVs_NXTMMX.h | 221 +++ EVs_NXTServo.cpp | 134 ++ EVs_NXTServo.h | 113 ++ EVs_NXTTouch.cpp | 37 + EVs_NXTTouch.h | 39 + EVs_NXTVoltMeter.cpp | 58 + EVs_NXTVoltMeter.h | 60 + EVs_NumericPad.cpp | 127 ++ EVs_NumericPad.h | 64 + EVs_PFMate.cpp | 105 ++ EVs_PFMate.h | 97 + EVs_PSPNx.cpp | 103 ++ EVs_PSPNx.h | 109 ++ EVs_PiLight.cpp | 62 + EVs_PiLight.h | 77 + EVs_RTC.cpp | 77 + EVs_RTC.h | 76 + EVs_SumoEyes.cpp | 97 + EVs_SumoEyes.h | 66 + MsTimer2.cpp | 157 ++ MsTimer2.h | 19 + SHDefines.h | 107 ++ SoftI2cMaster.cpp | 325 ++++ SoftI2cMaster.h | 124 ++ html/_base_i2_c_device_8h_source.html | 290 +++ html/_e_v_shield_8h.html | 681 +++++++ html/_e_v_shield_8h.js | 96 + html/_e_v_shield_8h_source.html | 550 ++++++ html/_e_v_shield_a_g_s_8h_source.html | 183 ++ html/_e_v_shield_i2_c_8h_source.html | 227 +++ html/_e_v_shield_u_a_r_t_8h_source.html | 202 +++ html/_e_vs___absolute_i_m_u_8h_source.html | 280 +++ html/_e_vs___angle_sensor_8h_source.html | 181 ++ html/_e_vs___d_i_s_t_nx_8h_source.html | 191 ++ html/_e_vs___e_v3_color_8h_source.html | 169 ++ html/_e_vs___e_v3_gyro_8h_source.html | 171 ++ html/_e_vs___e_v3_infrared_8h_source.html | 177 ++ html/_e_vs___e_v3_touch_8h_source.html | 170 ++ html/_e_vs___e_v3_ultrasonic_8h_source.html | 172 ++ .../_e_vs___light_sensor_array_8h_source.html | 218 +++ html/_e_vs___line_leader_8h_source.html | 288 +++ html/_e_vs___magic_wand_8h_source.html | 163 ++ html/_e_vs___n_x_t_cam_8h_source.html | 229 +++ html/_e_vs___n_x_t_color_8h_source.html | 187 ++ ..._e_vs___n_x_t_current_meter_8h_source.html | 179 ++ html/_e_vs___n_x_t_light_8h_source.html | 167 ++ html/_e_vs___n_x_t_m_m_x_8h_source.html | 340 ++++ html/_e_vs___n_x_t_servo_8h_source.html | 234 +++ html/_e_vs___n_x_t_touch_8h_source.html | 162 ++ html/_e_vs___n_x_t_volt_meter_8h_source.html | 179 ++ html/_e_vs___numeric_pad_8h_source.html | 174 ++ html/_e_vs___p_f_mate_8h_source.html | 218 +++ html/_e_vs___p_s_p_nx_8h_source.html | 222 +++ html/_e_vs___pi_light_8h_source.html | 188 ++ html/_e_vs___r_t_c_8h_source.html | 197 ++ html/_e_vs___sumo_eyes_8h_source.html | 189 ++ html/_ms_timer2_8h_source.html | 141 ++ html/_s_h_defines_8h.html | 240 +++ html/_s_h_defines_8h.js | 27 + html/_s_h_defines_8h_source.html | 228 +++ html/_soft_i2c_master_8h_source.html | 243 +++ html/annotated.html | 165 ++ html/annotated.js | 41 + html/bc_s.png | Bin 0 -> 676 bytes html/bdwn.png | Bin 0 -> 147 bytes html/class_base_i2_c_device-members.html | 148 ++ html/class_base_i2_c_device.html | 761 ++++++++ html/class_base_i2_c_device.js | 23 + html/class_base_i2_c_device.png | Bin 0 -> 6630 bytes html/class_e_v_shield-members.html | 139 ++ html/class_e_v_shield.html | 450 +++++ html/class_e_v_shield.js | 16 + html/class_e_v_shield_a_g_s-members.html | 133 ++ html/class_e_v_shield_a_g_s.html | 303 ++++ html/class_e_v_shield_a_g_s.js | 10 + html/class_e_v_shield_a_g_s.png | Bin 0 -> 942 bytes html/class_e_v_shield_bank-members.html | 205 +++ html/class_e_v_shield_bank.html | 1606 +++++++++++++++++ html/class_e_v_shield_bank.js | 43 + html/class_e_v_shield_bank.png | Bin 0 -> 1292 bytes html/class_e_v_shield_bank_b-members.html | 206 +++ html/class_e_v_shield_bank_b.html | 466 +++++ html/class_e_v_shield_bank_b.js | 6 + html/class_e_v_shield_bank_b.png | Bin 0 -> 1287 bytes html/class_e_v_shield_i2_c-members.html | 165 ++ html/class_e_v_shield_i2_c.html | 812 +++++++++ html/class_e_v_shield_i2_c.js | 24 + html/class_e_v_shield_i2_c.png | Bin 0 -> 7237 bytes html/class_e_v_shield_u_a_r_t-members.html | 140 ++ html/class_e_v_shield_u_a_r_t.html | 453 +++++ html/class_e_v_shield_u_a_r_t.js | 17 + html/class_e_v_shield_u_a_r_t.png | Bin 0 -> 1283 bytes html/class_e_vs___absolute_i_m_u-members.html | 173 ++ html/class_e_vs___absolute_i_m_u.html | 481 +++++ html/class_e_vs___absolute_i_m_u.js | 11 + html/class_e_vs___absolute_i_m_u.png | Bin 0 -> 1049 bytes html/class_e_vs___angle_sensor-members.html | 170 ++ html/class_e_vs___angle_sensor.html | 395 ++++ html/class_e_vs___angle_sensor.js | 8 + html/class_e_vs___angle_sensor.png | Bin 0 -> 1080 bytes html/class_e_vs___current_meter-members.html | 171 ++ html/class_e_vs___current_meter.html | 414 +++++ html/class_e_vs___current_meter.js | 9 + html/class_e_vs___current_meter.png | Bin 0 -> 1067 bytes html/class_e_vs___d_i_s_t_nx-members.html | 172 ++ html/class_e_vs___d_i_s_t_nx.html | 429 +++++ html/class_e_vs___d_i_s_t_nx.js | 10 + html/class_e_vs___d_i_s_t_nx.png | Bin 0 -> 997 bytes html/class_e_vs___e_v3_color-members.html | 141 ++ html/class_e_vs___e_v3_color.html | 232 +++ html/class_e_vs___e_v3_color.js | 5 + html/class_e_vs___e_v3_color.png | Bin 0 -> 492 bytes html/class_e_vs___e_v3_gyro-members.html | 143 ++ html/class_e_vs___e_v3_gyro.html | 242 +++ html/class_e_vs___e_v3_gyro.js | 7 + html/class_e_vs___e_v3_gyro.png | Bin 0 -> 504 bytes html/class_e_vs___e_v3_infrared-members.html | 144 ++ html/class_e_vs___e_v3_infrared.html | 273 +++ html/class_e_vs___e_v3_infrared.js | 8 + html/class_e_vs___e_v3_infrared.png | Bin 0 -> 531 bytes html/class_e_vs___e_v3_touch-members.html | 143 ++ html/class_e_vs___e_v3_touch.html | 269 +++ html/class_e_vs___e_v3_touch.js | 7 + html/class_e_vs___e_v3_touch.png | Bin 0 -> 500 bytes .../class_e_vs___e_v3_ultrasonic-members.html | 142 ++ html/class_e_vs___e_v3_ultrasonic.html | 250 +++ html/class_e_vs___e_v3_ultrasonic.js | 6 + html/class_e_vs___e_v3_ultrasonic.png | Bin 0 -> 546 bytes ...ass_e_vs___light_sensor_array-members.html | 180 ++ html/class_e_vs___light_sensor_array.html | 577 ++++++ html/class_e_vs___light_sensor_array.js | 18 + html/class_e_vs___light_sensor_array.png | Bin 0 -> 1285 bytes html/class_e_vs___line_leader-members.html | 200 ++ html/class_e_vs___line_leader.html | 951 ++++++++++ html/class_e_vs___line_leader.js | 38 + html/class_e_vs___line_leader.png | Bin 0 -> 1046 bytes html/class_e_vs___magic_wand-members.html | 167 ++ html/class_e_vs___magic_wand.html | 339 ++++ html/class_e_vs___magic_wand.js | 5 + html/class_e_vs___magic_wand.png | Bin 0 -> 1070 bytes html/class_e_vs___n_x_t_cam-members.html | 185 ++ html/class_e_vs___n_x_t_cam.html | 710 ++++++++ html/class_e_vs___n_x_t_cam.js | 23 + html/class_e_vs___n_x_t_cam.png | Bin 0 -> 1009 bytes html/class_e_vs___n_x_t_color-members.html | 135 ++ html/class_e_vs___n_x_t_color.html | 295 +++ html/class_e_vs___n_x_t_color.js | 12 + html/class_e_vs___n_x_t_light-members.html | 135 ++ html/class_e_vs___n_x_t_light.html | 237 +++ html/class_e_vs___n_x_t_light.js | 6 + html/class_e_vs___n_x_t_light.png | Bin 0 -> 509 bytes html/class_e_vs___n_x_t_m_m_x-members.html | 200 ++ html/class_e_vs___n_x_t_m_m_x.html | 1179 ++++++++++++ html/class_e_vs___n_x_t_m_m_x.js | 38 + html/class_e_vs___n_x_t_m_m_x.png | Bin 0 -> 1010 bytes html/class_e_vs___n_x_t_servo-members.html | 178 ++ html/class_e_vs___n_x_t_servo.html | 576 ++++++ html/class_e_vs___n_x_t_servo.js | 16 + html/class_e_vs___n_x_t_servo.png | Bin 0 -> 1031 bytes html/class_e_vs___n_x_t_touch-members.html | 134 ++ html/class_e_vs___n_x_t_touch.html | 203 +++ html/class_e_vs___n_x_t_touch.js | 5 + html/class_e_vs___n_x_t_touch.png | Bin 0 -> 512 bytes html/class_e_vs___numeric_pad-members.html | 169 ++ html/class_e_vs___numeric_pad.html | 396 ++++ html/class_e_vs___numeric_pad.js | 7 + html/class_e_vs___numeric_pad.png | Bin 0 -> 1068 bytes html/class_e_vs___p_f_mate-members.html | 175 ++ html/class_e_vs___p_f_mate.html | 512 ++++++ html/class_e_vs___p_f_mate.js | 13 + html/class_e_vs___p_f_mate.png | Bin 0 -> 995 bytes html/class_e_vs___p_s_p_nx-members.html | 176 ++ html/class_e_vs___p_s_p_nx.html | 516 ++++++ html/class_e_vs___p_s_p_nx.js | 14 + html/class_e_vs___p_s_p_nx.png | Bin 0 -> 991 bytes html/class_e_vs___pi_light-members.html | 169 ++ html/class_e_vs___pi_light.html | 415 +++++ html/class_e_vs___pi_light.js | 7 + html/class_e_vs___pi_light.png | Bin 0 -> 993 bytes html/class_e_vs___r_t_c-members.html | 173 ++ html/class_e_vs___r_t_c.html | 446 +++++ html/class_e_vs___r_t_c.js | 11 + html/class_e_vs___r_t_c.png | Bin 0 -> 961 bytes html/class_e_vs___sumo_eyes-members.html | 138 ++ html/class_e_vs___sumo_eyes.html | 292 +++ html/class_e_vs___sumo_eyes.js | 9 + html/class_e_vs___sumo_eyes.png | Bin 0 -> 532 bytes html/class_e_vs___volt_meter-members.html | 171 ++ html/class_e_vs___volt_meter.html | 414 +++++ html/class_e_vs___volt_meter.js | 9 + html/class_e_vs___volt_meter.png | Bin 0 -> 1014 bytes html/class_soft_i2c_master-members.html | 150 ++ html/class_soft_i2c_master.html | 732 ++++++++ html/class_soft_i2c_master.js | 27 + html/class_soft_i2c_master.png | Bin 0 -> 6647 bytes html/classes.html | 148 ++ html/closed.png | Bin 0 -> 132 bytes html/doxygen.css | 1357 ++++++++++++++ html/doxygen.png | Bin 0 -> 3779 bytes html/dynsections.js | 97 + html/files.html | 158 ++ html/files.js | 36 + html/ftv2blank.png | Bin 0 -> 86 bytes html/ftv2cl.png | Bin 0 -> 453 bytes html/ftv2doc.png | Bin 0 -> 746 bytes html/ftv2folderclosed.png | Bin 0 -> 616 bytes html/ftv2folderopen.png | Bin 0 -> 597 bytes html/ftv2lastnode.png | Bin 0 -> 86 bytes html/ftv2link.png | Bin 0 -> 746 bytes html/ftv2mlastnode.png | Bin 0 -> 246 bytes html/ftv2mnode.png | Bin 0 -> 246 bytes html/ftv2mo.png | Bin 0 -> 403 bytes html/ftv2node.png | Bin 0 -> 86 bytes html/ftv2ns.png | Bin 0 -> 388 bytes html/ftv2plastnode.png | Bin 0 -> 229 bytes html/ftv2pnode.png | Bin 0 -> 229 bytes html/ftv2splitbar.png | Bin 0 -> 314 bytes html/ftv2vertline.png | Bin 0 -> 86 bytes html/functions.html | 161 ++ html/functions_0x61.html | 179 ++ html/functions_0x62.html | 167 ++ html/functions_0x63.html | 185 ++ html/functions_0x64.html | 165 ++ html/functions_0x65.html | 246 +++ html/functions_0x67.html | 393 ++++ html/functions_0x68.html | 164 ++ html/functions_0x69.html | 214 +++ html/functions_0x6c.html | 164 ++ html/functions_0x6d.html | 294 +++ html/functions_0x6e.html | 155 ++ html/functions_0x6f.html | 155 ++ html/functions_0x70.html | 158 ++ html/functions_0x72.html | 266 +++ html/functions_0x73.html | 315 ++++ html/functions_0x74.html | 164 ++ html/functions_0x77.html | 197 ++ html/functions_dup.js | 21 + html/functions_func.html | 156 ++ html/functions_func.js | 19 + html/functions_func_0x63.html | 183 ++ html/functions_func_0x64.html | 163 ++ html/functions_func_0x65.html | 238 +++ html/functions_func_0x67.html | 361 ++++ html/functions_func_0x68.html | 153 ++ html/functions_func_0x69.html | 212 +++ html/functions_func_0x6c.html | 162 ++ html/functions_func_0x6d.html | 246 +++ html/functions_func_0x6e.html | 153 ++ html/functions_func_0x6f.html | 153 ++ html/functions_func_0x70.html | 156 ++ html/functions_func_0x72.html | 261 +++ html/functions_func_0x73.html | 313 ++++ html/functions_func_0x74.html | 153 ++ html/functions_func_0x77.html | 195 ++ html/functions_vars.html | 323 ++++ html/globals.html | 257 +++ html/globals_defs.html | 167 ++ html/globals_enum.html | 149 ++ html/globals_eval.html | 182 ++ html/globals_func.html | 131 ++ html/hierarchy.html | 166 ++ html/hierarchy.js | 48 + html/index.html | 134 ++ html/jquery.js | 72 + html/nav_f.png | Bin 0 -> 153 bytes html/nav_g.png | Bin 0 -> 94 bytes html/nav_h.png | Bin 0 -> 98 bytes html/navtree.css | 143 ++ html/navtree.js | 556 ++++++ html/navtreeindex0.js | 253 +++ html/navtreeindex1.js | 253 +++ html/navtreeindex2.js | 145 ++ html/oe-logo-web.png | Bin 0 -> 8748 bytes html/open.png | Bin 0 -> 123 bytes html/resize.js | 93 + html/search/all_5f.html | 26 + html/search/all_5f.js | 6 + html/search/all_61.html | 26 + html/search/all_61.js | 13 + html/search/all_62.html | 26 + html/search/all_62.js | 8 + html/search/all_63.html | 26 + html/search/all_63.js | 14 + html/search/all_64.html | 26 + html/search/all_64.js | 7 + html/search/all_65.html | 26 + html/search/all_65.js | 43 + html/search/all_66.html | 26 + html/search/all_66.js | 4 + html/search/all_67.html | 26 + html/search/all_67.js | 79 + html/search/all_68.html | 26 + html/search/all_68.js | 7 + html/search/all_69.html | 26 + html/search/all_69.js | 16 + html/search/all_6c.html | 26 + html/search/all_6c.js | 7 + html/search/all_6d.html | 26 + html/search/all_6d.js | 49 + html/search/all_6e.html | 26 + html/search/all_6e.js | 4 + html/search/all_6f.html | 26 + html/search/all_6f.js | 4 + html/search/all_70.html | 26 + html/search/all_70.js | 5 + html/search/all_72.html | 26 + html/search/all_72.js | 37 + html/search/all_73.html | 26 + html/search/all_73.js | 93 + html/search/all_74.html | 26 + html/search/all_74.js | 7 + html/search/all_77.html | 26 + html/search/all_77.js | 15 + html/search/classes_61.html | 26 + html/search/classes_61.js | 4 + html/search/classes_62.html | 26 + html/search/classes_62.js | 4 + html/search/classes_63.html | 26 + html/search/classes_63.js | 5 + html/search/classes_65.html | 26 + html/search/classes_65.js | 34 + html/search/classes_67.html | 26 + html/search/classes_67.js | 4 + html/search/classes_6d.html | 26 + html/search/classes_6d.js | 4 + html/search/classes_73.html | 26 + html/search/classes_73.js | 4 + html/search/close.png | Bin 0 -> 273 bytes html/search/defines_73.html | 26 + html/search/defines_73.js | 16 + html/search/enums_73.html | 26 + html/search/enums_73.js | 10 + html/search/enumvalues_73.html | 26 + html/search/enumvalues_73.js | 21 + html/search/files_65.html | 26 + html/search/files_65.js | 4 + html/search/files_73.html | 26 + html/search/files_73.js | 4 + html/search/functions_62.html | 26 + html/search/functions_62.js | 5 + html/search/functions_63.html | 26 + html/search/functions_63.js | 12 + html/search/functions_64.html | 26 + html/search/functions_64.js | 7 + html/search/functions_65.html | 26 + html/search/functions_65.js | 32 + html/search/functions_66.html | 26 + html/search/functions_66.js | 4 + html/search/functions_67.html | 26 + html/search/functions_67.js | 68 + html/search/functions_68.html | 26 + html/search/functions_68.js | 4 + html/search/functions_69.html | 26 + html/search/functions_69.js | 16 + html/search/functions_6c.html | 26 + html/search/functions_6c.js | 7 + html/search/functions_6d.html | 26 + html/search/functions_6d.js | 35 + html/search/functions_6e.html | 26 + html/search/functions_6e.js | 4 + html/search/functions_6f.html | 26 + html/search/functions_6f.js | 4 + html/search/functions_70.html | 26 + html/search/functions_70.js | 5 + html/search/functions_72.html | 26 + html/search/functions_72.js | 36 + html/search/functions_73.html | 26 + html/search/functions_73.js | 54 + html/search/functions_74.html | 26 + html/search/functions_74.js | 4 + html/search/functions_77.html | 26 + html/search/functions_77.js | 15 + html/search/mag_sel.png | Bin 0 -> 563 bytes html/search/nomatches.html | 12 + html/search/pages_65.html | 26 + html/search/pages_65.js | 4 + html/search/search.css | 271 +++ html/search/search.js | 811 +++++++++ html/search/search_l.png | Bin 0 -> 604 bytes html/search/search_m.png | Bin 0 -> 158 bytes html/search/search_r.png | Bin 0 -> 612 bytes html/search/variables_5f.html | 26 + html/search/variables_5f.js | 6 + html/search/variables_61.html | 26 + html/search/variables_61.js | 12 + html/search/variables_62.html | 26 + html/search/variables_62.js | 6 + html/search/variables_65.html | 26 + html/search/variables_65.js | 4 + html/search/variables_67.html | 26 + html/search/variables_67.js | 13 + html/search/variables_68.html | 26 + html/search/variables_68.js | 6 + html/search/variables_6d.html | 26 + html/search/variables_6d.js | 16 + html/search/variables_72.html | 26 + html/search/variables_72.js | 4 + html/search/variables_74.html | 26 + html/search/variables_74.js | 6 + html/structaccl-members.html | 139 ++ html/structaccl.html | 334 ++++ html/structaccl.js | 16 + html/structcmps-members.html | 130 ++ html/structcmps.html | 199 ++ html/structcmps.js | 7 + html/structcolor-members.html | 129 ++ html/structcolor.html | 184 ++ html/structcolor.js | 6 + html/structgyro-members.html | 136 ++ html/structgyro.html | 289 +++ html/structgyro.js | 13 + html/structmagnetic__field-members.html | 136 ++ html/structmagnetic__field.html | 289 +++ html/structmagnetic__field.js | 13 + html/sync_off.png | Bin 0 -> 853 bytes html/sync_on.png | Bin 0 -> 845 bytes html/tab_a.png | Bin 0 -> 142 bytes html/tab_b.png | Bin 0 -> 169 bytes html/tab_h.png | Bin 0 -> 177 bytes html/tab_s.png | Bin 0 -> 184 bytes html/tabs.css | 60 + keywords.txt | 585 ++++++ 491 files changed, 59984 insertions(+) create mode 100644 BaseI2CDevice.cpp create mode 100644 BaseI2CDevice.h create mode 100644 EVShield.cpp create mode 100644 EVShield.h create mode 100644 EVShieldAGS.cpp create mode 100644 EVShieldAGS.h create mode 100644 EVShieldI2C.cpp create mode 100644 EVShieldI2C.h create mode 100644 EVShieldUART.cpp create mode 100644 EVShieldUART.h create mode 100644 EVShield_examples/AngleSensor_examples/AngleSensor_example/AngleSensor/AngleSensor.ino create mode 100644 EVShield_examples/AngleSensor_examples/AngleSensor_example/AngleSensor/AngleSensor_SerialMonitor_example.txt create mode 100644 EVShield_examples/DistNx/DistNx.ino create mode 100644 EVShield_examples/LSArray_examples/LSArray_example/LSArray_example.ino create mode 100644 EVShield_examples/LineLeader_example/LineLeader_example.ino create mode 100644 EVShield_examples/NXTCam_blobs/NXTCam_blobs.ino create mode 100644 EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeter/NXTCurrentMeter.ino create mode 100644 EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeterRefSet/NXTCurrentMeterRefSet.ino create mode 100644 EVShield_examples/NXTVoltMeter_examples/NXTVoltMeter/NXTVoltMeter.ino create mode 100644 EVShield_examples/NXTVoltMeter_examples/NXTVoltMeterRefSet/NXTVoltMeterRefSet.ino create mode 100644 EVShield_examples/NumericPad/NumericPad.ino create mode 100644 EVShield_examples/PiLight_demo/PiLight_demo.ino create mode 100644 EVShield_examples/bump_count/bump_count.ino create mode 100644 EVShield_examples/ev3_gyro/ev3_gyro.ino create mode 100644 EVShield_examples/ev3_infrared/ev3_infrared.ino create mode 100644 EVShield_examples/ev3_touch/ev3_touch.ino create mode 100644 EVShield_examples/ev3_ultrasonic/ev3_ultrasonic.ino create mode 100644 EVShield_examples/motor_and_touch/motor_and_touch.ino create mode 100644 EVShield_examples/motor_rotations/motor_rotations.ino create mode 100644 EVShield_examples/multi_color_led/multi_color_led.ino create mode 100644 EVShield_examples/nxt_color/nxt_color.ino create mode 100644 EVShield_examples/nxt_light/nxt_light.ino create mode 100644 EVShield_examples/nxt_touch/nxt_touch.ino create mode 100644 EVShield_examples/print_bank_info/print_bank_info.ino create mode 100644 EVShield_examples/rc_servo_with_buttons/rc_servo_with_buttons.ino create mode 100644 EVShield_examples/shield_buttons/shield_buttons.ino create mode 100644 EVShield_examples/sumo_eyes/sumo_eyes.ino create mode 100644 EVShield_examples/tank_drive_with_pspnx/tank_drive_with_pspnx.ino create mode 100644 EVs_AbsoluteIMU.cpp create mode 100644 EVs_AbsoluteIMU.h create mode 100644 EVs_AngleSensor.cpp create mode 100644 EVs_AngleSensor.h create mode 100644 EVs_DISTNx.cpp create mode 100644 EVs_DISTNx.h create mode 100644 EVs_EV3Color.cpp create mode 100644 EVs_EV3Color.h create mode 100644 EVs_EV3Gyro.cpp create mode 100644 EVs_EV3Gyro.h create mode 100644 EVs_EV3Infrared.cpp create mode 100644 EVs_EV3Infrared.h create mode 100644 EVs_EV3Touch.cpp create mode 100644 EVs_EV3Touch.h create mode 100644 EVs_EV3Ultrasonic.cpp create mode 100644 EVs_EV3Ultrasonic.h create mode 100644 EVs_LightSensorArray.cpp create mode 100644 EVs_LightSensorArray.h create mode 100644 EVs_LineLeader.cpp create mode 100644 EVs_LineLeader.h create mode 100644 EVs_MagicWand.cpp create mode 100644 EVs_MagicWand.h create mode 100644 EVs_NXTCam.cpp create mode 100644 EVs_NXTCam.h create mode 100644 EVs_NXTColor.cpp create mode 100644 EVs_NXTColor.h create mode 100644 EVs_NXTCurrentMeter.cpp create mode 100644 EVs_NXTCurrentMeter.h create mode 100644 EVs_NXTLight.cpp create mode 100644 EVs_NXTLight.h create mode 100644 EVs_NXTMMX.cpp create mode 100644 EVs_NXTMMX.h create mode 100644 EVs_NXTServo.cpp create mode 100644 EVs_NXTServo.h create mode 100644 EVs_NXTTouch.cpp create mode 100644 EVs_NXTTouch.h create mode 100644 EVs_NXTVoltMeter.cpp create mode 100644 EVs_NXTVoltMeter.h create mode 100644 EVs_NumericPad.cpp create mode 100644 EVs_NumericPad.h create mode 100644 EVs_PFMate.cpp create mode 100644 EVs_PFMate.h create mode 100644 EVs_PSPNx.cpp create mode 100644 EVs_PSPNx.h create mode 100644 EVs_PiLight.cpp create mode 100644 EVs_PiLight.h create mode 100644 EVs_RTC.cpp create mode 100644 EVs_RTC.h create mode 100644 EVs_SumoEyes.cpp create mode 100644 EVs_SumoEyes.h create mode 100644 MsTimer2.cpp create mode 100644 MsTimer2.h create mode 100644 SHDefines.h create mode 100644 SoftI2cMaster.cpp create mode 100644 SoftI2cMaster.h create mode 100644 html/_base_i2_c_device_8h_source.html create mode 100644 html/_e_v_shield_8h.html create mode 100644 html/_e_v_shield_8h.js create mode 100644 html/_e_v_shield_8h_source.html create mode 100644 html/_e_v_shield_a_g_s_8h_source.html create mode 100644 html/_e_v_shield_i2_c_8h_source.html create mode 100644 html/_e_v_shield_u_a_r_t_8h_source.html create mode 100644 html/_e_vs___absolute_i_m_u_8h_source.html create mode 100644 html/_e_vs___angle_sensor_8h_source.html create mode 100644 html/_e_vs___d_i_s_t_nx_8h_source.html create mode 100644 html/_e_vs___e_v3_color_8h_source.html create mode 100644 html/_e_vs___e_v3_gyro_8h_source.html create mode 100644 html/_e_vs___e_v3_infrared_8h_source.html create mode 100644 html/_e_vs___e_v3_touch_8h_source.html create mode 100644 html/_e_vs___e_v3_ultrasonic_8h_source.html create mode 100644 html/_e_vs___light_sensor_array_8h_source.html create mode 100644 html/_e_vs___line_leader_8h_source.html create mode 100644 html/_e_vs___magic_wand_8h_source.html create mode 100644 html/_e_vs___n_x_t_cam_8h_source.html create mode 100644 html/_e_vs___n_x_t_color_8h_source.html create mode 100644 html/_e_vs___n_x_t_current_meter_8h_source.html create mode 100644 html/_e_vs___n_x_t_light_8h_source.html create mode 100644 html/_e_vs___n_x_t_m_m_x_8h_source.html create mode 100644 html/_e_vs___n_x_t_servo_8h_source.html create mode 100644 html/_e_vs___n_x_t_touch_8h_source.html create mode 100644 html/_e_vs___n_x_t_volt_meter_8h_source.html create mode 100644 html/_e_vs___numeric_pad_8h_source.html create mode 100644 html/_e_vs___p_f_mate_8h_source.html create mode 100644 html/_e_vs___p_s_p_nx_8h_source.html create mode 100644 html/_e_vs___pi_light_8h_source.html create mode 100644 html/_e_vs___r_t_c_8h_source.html create mode 100644 html/_e_vs___sumo_eyes_8h_source.html create mode 100644 html/_ms_timer2_8h_source.html create mode 100644 html/_s_h_defines_8h.html create mode 100644 html/_s_h_defines_8h.js create mode 100644 html/_s_h_defines_8h_source.html create mode 100644 html/_soft_i2c_master_8h_source.html create mode 100644 html/annotated.html create mode 100644 html/annotated.js create mode 100644 html/bc_s.png create mode 100644 html/bdwn.png create mode 100644 html/class_base_i2_c_device-members.html create mode 100644 html/class_base_i2_c_device.html create mode 100644 html/class_base_i2_c_device.js create mode 100644 html/class_base_i2_c_device.png create mode 100644 html/class_e_v_shield-members.html create mode 100644 html/class_e_v_shield.html create mode 100644 html/class_e_v_shield.js create mode 100644 html/class_e_v_shield_a_g_s-members.html create mode 100644 html/class_e_v_shield_a_g_s.html create mode 100644 html/class_e_v_shield_a_g_s.js create mode 100644 html/class_e_v_shield_a_g_s.png create mode 100644 html/class_e_v_shield_bank-members.html create mode 100644 html/class_e_v_shield_bank.html create mode 100644 html/class_e_v_shield_bank.js create mode 100644 html/class_e_v_shield_bank.png create mode 100644 html/class_e_v_shield_bank_b-members.html create mode 100644 html/class_e_v_shield_bank_b.html create mode 100644 html/class_e_v_shield_bank_b.js create mode 100644 html/class_e_v_shield_bank_b.png create mode 100644 html/class_e_v_shield_i2_c-members.html create mode 100644 html/class_e_v_shield_i2_c.html create mode 100644 html/class_e_v_shield_i2_c.js create mode 100644 html/class_e_v_shield_i2_c.png create mode 100644 html/class_e_v_shield_u_a_r_t-members.html create mode 100644 html/class_e_v_shield_u_a_r_t.html create mode 100644 html/class_e_v_shield_u_a_r_t.js create mode 100644 html/class_e_v_shield_u_a_r_t.png create mode 100644 html/class_e_vs___absolute_i_m_u-members.html create mode 100644 html/class_e_vs___absolute_i_m_u.html create mode 100644 html/class_e_vs___absolute_i_m_u.js create mode 100644 html/class_e_vs___absolute_i_m_u.png create mode 100644 html/class_e_vs___angle_sensor-members.html create mode 100644 html/class_e_vs___angle_sensor.html create mode 100644 html/class_e_vs___angle_sensor.js create mode 100644 html/class_e_vs___angle_sensor.png create mode 100644 html/class_e_vs___current_meter-members.html create mode 100644 html/class_e_vs___current_meter.html create mode 100644 html/class_e_vs___current_meter.js create mode 100644 html/class_e_vs___current_meter.png create mode 100644 html/class_e_vs___d_i_s_t_nx-members.html create mode 100644 html/class_e_vs___d_i_s_t_nx.html create mode 100644 html/class_e_vs___d_i_s_t_nx.js create mode 100644 html/class_e_vs___d_i_s_t_nx.png create mode 100644 html/class_e_vs___e_v3_color-members.html create mode 100644 html/class_e_vs___e_v3_color.html create mode 100644 html/class_e_vs___e_v3_color.js create mode 100644 html/class_e_vs___e_v3_color.png create mode 100644 html/class_e_vs___e_v3_gyro-members.html create mode 100644 html/class_e_vs___e_v3_gyro.html create mode 100644 html/class_e_vs___e_v3_gyro.js create mode 100644 html/class_e_vs___e_v3_gyro.png create mode 100644 html/class_e_vs___e_v3_infrared-members.html create mode 100644 html/class_e_vs___e_v3_infrared.html create mode 100644 html/class_e_vs___e_v3_infrared.js create mode 100644 html/class_e_vs___e_v3_infrared.png create mode 100644 html/class_e_vs___e_v3_touch-members.html create mode 100644 html/class_e_vs___e_v3_touch.html create mode 100644 html/class_e_vs___e_v3_touch.js create mode 100644 html/class_e_vs___e_v3_touch.png create mode 100644 html/class_e_vs___e_v3_ultrasonic-members.html create mode 100644 html/class_e_vs___e_v3_ultrasonic.html create mode 100644 html/class_e_vs___e_v3_ultrasonic.js create mode 100644 html/class_e_vs___e_v3_ultrasonic.png create mode 100644 html/class_e_vs___light_sensor_array-members.html create mode 100644 html/class_e_vs___light_sensor_array.html create mode 100644 html/class_e_vs___light_sensor_array.js create mode 100644 html/class_e_vs___light_sensor_array.png create mode 100644 html/class_e_vs___line_leader-members.html create mode 100644 html/class_e_vs___line_leader.html create mode 100644 html/class_e_vs___line_leader.js create mode 100644 html/class_e_vs___line_leader.png create mode 100644 html/class_e_vs___magic_wand-members.html create mode 100644 html/class_e_vs___magic_wand.html create mode 100644 html/class_e_vs___magic_wand.js create mode 100644 html/class_e_vs___magic_wand.png create mode 100644 html/class_e_vs___n_x_t_cam-members.html create mode 100644 html/class_e_vs___n_x_t_cam.html create mode 100644 html/class_e_vs___n_x_t_cam.js create mode 100644 html/class_e_vs___n_x_t_cam.png create mode 100644 html/class_e_vs___n_x_t_color-members.html create mode 100644 html/class_e_vs___n_x_t_color.html create mode 100644 html/class_e_vs___n_x_t_color.js create mode 100644 html/class_e_vs___n_x_t_light-members.html create mode 100644 html/class_e_vs___n_x_t_light.html create mode 100644 html/class_e_vs___n_x_t_light.js create mode 100644 html/class_e_vs___n_x_t_light.png create mode 100644 html/class_e_vs___n_x_t_m_m_x-members.html create mode 100644 html/class_e_vs___n_x_t_m_m_x.html create mode 100644 html/class_e_vs___n_x_t_m_m_x.js create mode 100644 html/class_e_vs___n_x_t_m_m_x.png create mode 100644 html/class_e_vs___n_x_t_servo-members.html create mode 100644 html/class_e_vs___n_x_t_servo.html create mode 100644 html/class_e_vs___n_x_t_servo.js create mode 100644 html/class_e_vs___n_x_t_servo.png create mode 100644 html/class_e_vs___n_x_t_touch-members.html create mode 100644 html/class_e_vs___n_x_t_touch.html create mode 100644 html/class_e_vs___n_x_t_touch.js create mode 100644 html/class_e_vs___n_x_t_touch.png create mode 100644 html/class_e_vs___numeric_pad-members.html create mode 100644 html/class_e_vs___numeric_pad.html create mode 100644 html/class_e_vs___numeric_pad.js create mode 100644 html/class_e_vs___numeric_pad.png create mode 100644 html/class_e_vs___p_f_mate-members.html create mode 100644 html/class_e_vs___p_f_mate.html create mode 100644 html/class_e_vs___p_f_mate.js create mode 100644 html/class_e_vs___p_f_mate.png create mode 100644 html/class_e_vs___p_s_p_nx-members.html create mode 100644 html/class_e_vs___p_s_p_nx.html create mode 100644 html/class_e_vs___p_s_p_nx.js create mode 100644 html/class_e_vs___p_s_p_nx.png create mode 100644 html/class_e_vs___pi_light-members.html create mode 100644 html/class_e_vs___pi_light.html create mode 100644 html/class_e_vs___pi_light.js create mode 100644 html/class_e_vs___pi_light.png create mode 100644 html/class_e_vs___r_t_c-members.html create mode 100644 html/class_e_vs___r_t_c.html create mode 100644 html/class_e_vs___r_t_c.js create mode 100644 html/class_e_vs___r_t_c.png create mode 100644 html/class_e_vs___sumo_eyes-members.html create mode 100644 html/class_e_vs___sumo_eyes.html create mode 100644 html/class_e_vs___sumo_eyes.js create mode 100644 html/class_e_vs___sumo_eyes.png create mode 100644 html/class_e_vs___volt_meter-members.html create mode 100644 html/class_e_vs___volt_meter.html create mode 100644 html/class_e_vs___volt_meter.js create mode 100644 html/class_e_vs___volt_meter.png create mode 100644 html/class_soft_i2c_master-members.html create mode 100644 html/class_soft_i2c_master.html create mode 100644 html/class_soft_i2c_master.js create mode 100644 html/class_soft_i2c_master.png create mode 100644 html/classes.html create mode 100644 html/closed.png create mode 100644 html/doxygen.css create mode 100644 html/doxygen.png create mode 100644 html/dynsections.js create mode 100644 html/files.html create mode 100644 html/files.js create mode 100644 html/ftv2blank.png create mode 100644 html/ftv2cl.png create mode 100644 html/ftv2doc.png create mode 100644 html/ftv2folderclosed.png create mode 100644 html/ftv2folderopen.png create mode 100644 html/ftv2lastnode.png create mode 100644 html/ftv2link.png create mode 100644 html/ftv2mlastnode.png create mode 100644 html/ftv2mnode.png create mode 100644 html/ftv2mo.png create mode 100644 html/ftv2node.png create mode 100644 html/ftv2ns.png create mode 100644 html/ftv2plastnode.png create mode 100644 html/ftv2pnode.png create mode 100644 html/ftv2splitbar.png create mode 100644 html/ftv2vertline.png create mode 100644 html/functions.html create mode 100644 html/functions_0x61.html create mode 100644 html/functions_0x62.html create mode 100644 html/functions_0x63.html create mode 100644 html/functions_0x64.html create mode 100644 html/functions_0x65.html create mode 100644 html/functions_0x67.html create mode 100644 html/functions_0x68.html create mode 100644 html/functions_0x69.html create mode 100644 html/functions_0x6c.html create mode 100644 html/functions_0x6d.html create mode 100644 html/functions_0x6e.html create mode 100644 html/functions_0x6f.html create mode 100644 html/functions_0x70.html create mode 100644 html/functions_0x72.html create mode 100644 html/functions_0x73.html create mode 100644 html/functions_0x74.html create mode 100644 html/functions_0x77.html create mode 100644 html/functions_dup.js create mode 100644 html/functions_func.html create mode 100644 html/functions_func.js create mode 100644 html/functions_func_0x63.html create mode 100644 html/functions_func_0x64.html create mode 100644 html/functions_func_0x65.html create mode 100644 html/functions_func_0x67.html create mode 100644 html/functions_func_0x68.html create mode 100644 html/functions_func_0x69.html create mode 100644 html/functions_func_0x6c.html create mode 100644 html/functions_func_0x6d.html create mode 100644 html/functions_func_0x6e.html create mode 100644 html/functions_func_0x6f.html create mode 100644 html/functions_func_0x70.html create mode 100644 html/functions_func_0x72.html create mode 100644 html/functions_func_0x73.html create mode 100644 html/functions_func_0x74.html create mode 100644 html/functions_func_0x77.html create mode 100644 html/functions_vars.html create mode 100644 html/globals.html create mode 100644 html/globals_defs.html create mode 100644 html/globals_enum.html create mode 100644 html/globals_eval.html create mode 100644 html/globals_func.html create mode 100644 html/hierarchy.html create mode 100644 html/hierarchy.js create mode 100644 html/index.html create mode 100644 html/jquery.js create mode 100644 html/nav_f.png create mode 100644 html/nav_g.png create mode 100644 html/nav_h.png create mode 100644 html/navtree.css create mode 100644 html/navtree.js create mode 100644 html/navtreeindex0.js create mode 100644 html/navtreeindex1.js create mode 100644 html/navtreeindex2.js create mode 100644 html/oe-logo-web.png create mode 100644 html/open.png create mode 100644 html/resize.js create mode 100644 html/search/all_5f.html create mode 100644 html/search/all_5f.js create mode 100644 html/search/all_61.html create mode 100644 html/search/all_61.js create mode 100644 html/search/all_62.html create mode 100644 html/search/all_62.js create mode 100644 html/search/all_63.html create mode 100644 html/search/all_63.js create mode 100644 html/search/all_64.html create mode 100644 html/search/all_64.js create mode 100644 html/search/all_65.html create mode 100644 html/search/all_65.js create mode 100644 html/search/all_66.html create mode 100644 html/search/all_66.js create mode 100644 html/search/all_67.html create mode 100644 html/search/all_67.js create mode 100644 html/search/all_68.html create mode 100644 html/search/all_68.js create mode 100644 html/search/all_69.html create mode 100644 html/search/all_69.js create mode 100644 html/search/all_6c.html create mode 100644 html/search/all_6c.js create mode 100644 html/search/all_6d.html create mode 100644 html/search/all_6d.js create mode 100644 html/search/all_6e.html create mode 100644 html/search/all_6e.js create mode 100644 html/search/all_6f.html create mode 100644 html/search/all_6f.js create mode 100644 html/search/all_70.html create mode 100644 html/search/all_70.js create mode 100644 html/search/all_72.html create mode 100644 html/search/all_72.js create mode 100644 html/search/all_73.html create mode 100644 html/search/all_73.js create mode 100644 html/search/all_74.html create mode 100644 html/search/all_74.js create mode 100644 html/search/all_77.html create mode 100644 html/search/all_77.js create mode 100644 html/search/classes_61.html create mode 100644 html/search/classes_61.js create mode 100644 html/search/classes_62.html create mode 100644 html/search/classes_62.js create mode 100644 html/search/classes_63.html create mode 100644 html/search/classes_63.js create mode 100644 html/search/classes_65.html create mode 100644 html/search/classes_65.js create mode 100644 html/search/classes_67.html create mode 100644 html/search/classes_67.js create mode 100644 html/search/classes_6d.html create mode 100644 html/search/classes_6d.js create mode 100644 html/search/classes_73.html create mode 100644 html/search/classes_73.js create mode 100644 html/search/close.png create mode 100644 html/search/defines_73.html create mode 100644 html/search/defines_73.js create mode 100644 html/search/enums_73.html create mode 100644 html/search/enums_73.js create mode 100644 html/search/enumvalues_73.html create mode 100644 html/search/enumvalues_73.js create mode 100644 html/search/files_65.html create mode 100644 html/search/files_65.js create mode 100644 html/search/files_73.html create mode 100644 html/search/files_73.js create mode 100644 html/search/functions_62.html create mode 100644 html/search/functions_62.js create mode 100644 html/search/functions_63.html create mode 100644 html/search/functions_63.js create mode 100644 html/search/functions_64.html create mode 100644 html/search/functions_64.js create mode 100644 html/search/functions_65.html create mode 100644 html/search/functions_65.js create mode 100644 html/search/functions_66.html create mode 100644 html/search/functions_66.js create mode 100644 html/search/functions_67.html create mode 100644 html/search/functions_67.js create mode 100644 html/search/functions_68.html create mode 100644 html/search/functions_68.js create mode 100644 html/search/functions_69.html create mode 100644 html/search/functions_69.js create mode 100644 html/search/functions_6c.html create mode 100644 html/search/functions_6c.js create mode 100644 html/search/functions_6d.html create mode 100644 html/search/functions_6d.js create mode 100644 html/search/functions_6e.html create mode 100644 html/search/functions_6e.js create mode 100644 html/search/functions_6f.html create mode 100644 html/search/functions_6f.js create mode 100644 html/search/functions_70.html create mode 100644 html/search/functions_70.js create mode 100644 html/search/functions_72.html create mode 100644 html/search/functions_72.js create mode 100644 html/search/functions_73.html create mode 100644 html/search/functions_73.js create mode 100644 html/search/functions_74.html create mode 100644 html/search/functions_74.js create mode 100644 html/search/functions_77.html create mode 100644 html/search/functions_77.js create mode 100644 html/search/mag_sel.png create mode 100644 html/search/nomatches.html create mode 100644 html/search/pages_65.html create mode 100644 html/search/pages_65.js create mode 100644 html/search/search.css create mode 100644 html/search/search.js create mode 100644 html/search/search_l.png create mode 100644 html/search/search_m.png create mode 100644 html/search/search_r.png create mode 100644 html/search/variables_5f.html create mode 100644 html/search/variables_5f.js create mode 100644 html/search/variables_61.html create mode 100644 html/search/variables_61.js create mode 100644 html/search/variables_62.html create mode 100644 html/search/variables_62.js create mode 100644 html/search/variables_65.html create mode 100644 html/search/variables_65.js create mode 100644 html/search/variables_67.html create mode 100644 html/search/variables_67.js create mode 100644 html/search/variables_68.html create mode 100644 html/search/variables_68.js create mode 100644 html/search/variables_6d.html create mode 100644 html/search/variables_6d.js create mode 100644 html/search/variables_72.html create mode 100644 html/search/variables_72.js create mode 100644 html/search/variables_74.html create mode 100644 html/search/variables_74.js create mode 100644 html/structaccl-members.html create mode 100644 html/structaccl.html create mode 100644 html/structaccl.js create mode 100644 html/structcmps-members.html create mode 100644 html/structcmps.html create mode 100644 html/structcmps.js create mode 100644 html/structcolor-members.html create mode 100644 html/structcolor.html create mode 100644 html/structcolor.js create mode 100644 html/structgyro-members.html create mode 100644 html/structgyro.html create mode 100644 html/structgyro.js create mode 100644 html/structmagnetic__field-members.html create mode 100644 html/structmagnetic__field.html create mode 100644 html/structmagnetic__field.js create mode 100644 html/sync_off.png create mode 100644 html/sync_on.png create mode 100644 html/tab_a.png create mode 100644 html/tab_b.png create mode 100644 html/tab_h.png create mode 100644 html/tab_s.png create mode 100644 html/tabs.css create mode 100644 keywords.txt diff --git a/BaseI2CDevice.cpp b/BaseI2CDevice.cpp new file mode 100644 index 0000000..6a3c74f --- /dev/null +++ b/BaseI2CDevice.cpp @@ -0,0 +1,295 @@ +// BaseI2CDevice.cpp +// +// This is a base class for devices that use the I2C protocol. +// +// 2010-05-31 - Initial version, by Clinton Blackmore +// +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "BaseI2CDevice.h" +#include + +extern "C" { +#include "../Wire/utility/twi.h" +} + +// Max I2C message length is 16 bytes. +const int BUFFER_LEN = 16; + + +// Initialize static variables +uint8_t* BaseI2CDevice::_buffer = 0; +bool BaseI2CDevice::b_initialized = false; + + +BaseI2CDevice::BaseI2CDevice(uint8_t i2c_address) +{ + // As I understand it, an I2C bus can address 127 different devices (a 7-bit quantity). + // When used, the 7-bit quantity is shifted right one bit, and the last bit is clear + // for a read operation and set for a write operation. Arduino's Wire library expects + // a 7-bit address, but most tech specs list the 8-bit address. Hence, we drop + // the least significant bit (and Wire.h shifts the address and sets the read/write + // bit as appropriate.) + b_initialized = false; + _device_address = i2c_address >> 1; + + _buffer = (uint8_t*) calloc(BUFFER_LEN, sizeof(uint8_t)); +} + +void BaseI2CDevice::initProtocol() +{ + if ( b_initialized ) return; + Wire.begin(); + b_initialized = true; +} + +// READING FUNCTIONS + +// Reads registers of an I2C device. +// See the documentation for your device to know what a given register +// or register range indicates. +uint8_t* BaseI2CDevice::readRegisters( + uint8_t start_register, // start of the register range + uint8_t bytes_to_read, // number of bytes to read (max 16 for lego devices) + uint8_t* buffer, // (optional) user-supplied buffer + uint8_t buffer_length, // (optional) length of user-supplied buffer + bool clear_buffer) // should we zero out the buffer first? (optional) +{ + if (!buffer) + { + buffer = _buffer; + } + + if (!buffer_length) + { + buffer_length = BUFFER_LEN; + } + + bytes_to_read = min(bytes_to_read, buffer_length); // avoid buffer overflow + + if (clear_buffer) + { + memset(buffer, 0, buffer_length); + } + + // We write to the I2C device to tell it where we want to read from + Wire.beginTransmission(_device_address); +#if defined(ARDUINO) && ARDUINO >= 100 + Wire.write(start_register); +#else + Wire.send(start_register); +#endif + //Wire.send(bytes_to_read); + Wire.endTransmission(); + + // Now we can read the data from the device + Wire.requestFrom(_device_address, bytes_to_read); + + for (uint8_t index = 0; Wire.available(); ++index) + { +#if defined(ARDUINO) && ARDUINO >= 100 + buffer[index] = Wire.read(); +#else + buffer[index] = Wire.receive(); +#endif + } + + _write_error_code = Wire.endTransmission(); + + return buffer; +} + +// Reads a byte from the given register on the I2C device. +uint8_t BaseI2CDevice::readByte(uint8_t location) +{ + readRegisters(location, 1); + return _buffer[0]; +} + +// Reads two bytes from the given register pair on the I2C device. +int16_t BaseI2CDevice::readInteger(uint8_t location) +{ + readRegisters(location, 2); + + // I believe the data has the least significant byte first + return readIntFromBuffer(_buffer); +} + +// Reads four bytes from the given registers, starting at the specified location, on the I2C device. +uint32_t BaseI2CDevice::readLong(uint8_t location) +{ + readRegisters(location, 4); + return readLongFromBuffer(_buffer); +} + +// Reads a string. Be certain that your buffer is large enough +// to hold the string and a trailing 'nul'! +char* BaseI2CDevice::readString( + uint8_t location, // starting location of the string + uint8_t bytes_to_read, // number of bytes to read + uint8_t* buffer, // optional user-supplied buffer + uint8_t buffer_length) // length of user-supplied buffer) +{ + return (char *)readRegisters(location, bytes_to_read, buffer, buffer_length, true); +} + + +// WRITING FUNCTIONS + +// Returns true if the write was successful. +// If not true, you may check the result by calling getWriteErrorCode. +bool BaseI2CDevice::writeRegisters( + uint8_t start_register, // start of the register range + uint8_t bytes_to_write, // number of bytes to write + uint8_t* buffer) // optional user-supplied buffer +{ + if (!buffer) + { + buffer = _buffer; + } + + // We write to the I2C device to tell it where we want to read from and how many bytes + Wire.beginTransmission(_device_address); +#if defined(ARDUINO) && ARDUINO >= 100 + Wire.write(start_register); +#else + Wire.send(start_register); +#endif + + // Send the data + for (uint8_t index = 0; index < bytes_to_write; ++index) + { +#if defined(ARDUINO) && ARDUINO >= 100 + Wire.write(buffer[index]); +#else + Wire.send(buffer[index]); +#endif + } + + _write_error_code = Wire.endTransmission(); + + return _write_error_code == 0; // 0 indicates success +} + +// Writes a byte to a given register of the I2C device +bool BaseI2CDevice::writeByte(uint8_t location, uint8_t data) +{ + return writeRegisters(location, 1, &data); +} + +// Writes two bytes to a given register of the I2C device +bool BaseI2CDevice::writeInteger(uint8_t location, uint16_t data) +{ + writeIntToBuffer(_buffer, data); + return writeRegisters(location, 2, _buffer); +} + +// Writes four bytes to a given register of the I2C device +bool BaseI2CDevice::writeLong(uint8_t location, uint32_t data) +{ + writeLongToBuffer(_buffer, data); + return writeRegisters(location, 4, _buffer); +} + +// This is the status value returned from the last write command. +// A return value of zero indicates success. +// Non-zero results indicate failures. From libraries/Wire/utility/twi.c, they are: +// 1 .. length to long for buffer +// 2 .. address send, NACK received +// 3 .. data send, NACK received +// 4 .. other twi error (lost bus arbitration, bus error, ..) +uint8_t BaseI2CDevice::getWriteErrorCode() +{ + return _write_error_code; +} + +// READ SOME INFORMATION OFF OF THE DEVICE +// returns a string with the current firmware version of the device +char* BaseI2CDevice::getFirmwareVersion() +{ + return readString(0, 8); +} + +// returns a string indicating the vendor of the device +char* BaseI2CDevice::getVendorID() +{ + return readString(0x08, 8); +} + +// returns a string indicating the device's ID +char* BaseI2CDevice::getDeviceID() +{ + return readString(0x10, 8); +} + +/** returns a string indicating the features on this device + some devices may return null. +*/ +char* BaseI2CDevice::getFeatureSet() +{ + return readString(0x18, 8); +} + +// It is very unusual to do this +void BaseI2CDevice::setWriteErrorCode(uint8_t code) +{ + _write_error_code = code; +} + + +/** + * checkAddress() + * this function checks to see if there is + * any device at its specified address + */ + +bool BaseI2CDevice::checkAddress() +{ + uint8_t *txBuffer; + int8_t x = 1; +#if defined(__PIC32MX__) + x = twi_writeTo(_device_address, txBuffer, 0, 1) == 0; +#else + #if defined(ARDUINO) && ARDUINO <= 100 + x = twi_writeTo(_device_address, txBuffer, 0, 1) == 0; + #else + x = twi_writeTo(_device_address, txBuffer, 0, 1, 1) == 0; + #endif +#endif + return (x != 0); +} + + +/** + * setAddress(address) + * this function set's the i2c address + * for this instance to given address + * Note that, generally i2c address of a physical device does not change. + * Use this function if there are multiple devices on your bus and you want to + * conserve processor memory from instantiating another class instance. + */ + +bool BaseI2CDevice::setAddress(uint8_t i2c_address) +{ + _device_address = i2c_address >> 1; + return true; +} + +uint8_t BaseI2CDevice::getAddress() +{ + return _device_address; +} diff --git a/BaseI2CDevice.h b/BaseI2CDevice.h new file mode 100644 index 0000000..dda8cc0 --- /dev/null +++ b/BaseI2CDevice.h @@ -0,0 +1,214 @@ + +// BaseI2CDevice.h +// +// This is a class for controlling some devices that +// communicate using the I2C protocol. +// +// Use at your own risk! +// +// Initial version: 2010-05-31 by Clinton Blackmore + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* Change log +* 07/07/11 Deepak Patil Added getFeatureSet. +*/ + +#ifndef BASEI2CDEVICE_H +#define BASEI2CDEVICE_H + +#if defined(ARDUINO) && ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif + +#include + +/** parse the two bytes in the buffer into an integer */ +inline uint16_t readIntFromBuffer(uint8_t* buf) +{ + return buf[0] | (buf[1] << 8); +} + +/** parse the four bytes in the buffer into an integer of type long */ +inline uint32_t readLongFromBuffer(uint8_t* buf) +{ + return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); +} + +/** write the data as a byte to the supplied buffer */ +inline void writeByteToBuffer(uint8_t* buf, uint8_t data) +{ + buf[0] = data; +} + +inline void writeByteToBuffer(uint8_t* buf, int8_t data) +{ + writeByteToBuffer(buf, (uint8_t)data); +} + +/** write the two byte integer to the supplied buffer */ +inline void writeIntToBuffer(uint8_t* buf, uint16_t data) +{ + buf[0] = data & 0xFF; + buf[1] = (data >> 8) & 0xFF; +} + +inline void writeIntToBuffer(uint8_t* buf, int16_t data) +{ + writeIntToBuffer(buf, (uint16_t)data); +} + +/** write the four byte integer of type long to the supplied buffer */ +inline void writeLongToBuffer(uint8_t* buf, uint32_t data) +{ + buf[0] = data & 0xFF; + buf[1] = (data >> 8) & 0xFF; + buf[2] = (data >> 16) & 0xFF; + buf[3] = (data >> 24) & 0xFF; +} + +inline void writeLongToBuffer(uint8_t* buf, int32_t data) +{ + writeLongToBuffer(buf, (uint32_t)data); +} + +/** + @brief This class implements hardware I2C protocol used by EVShield/NXShield on an Arduino + */ +class BaseI2CDevice +{ + // Note that this class is a base class, but not an abstract base class + // Feel free to instantiate BaseI2CDevice. + +public: + /** constructor for the BaseI2C Device class; requires the i2c address of the device */ + BaseI2CDevice(uint8_t i2c_address); + + /** initialize hardware i2c using the Wire.h library */ + void initProtocol(); + + /** read specified number of bytes from the start register. + @param start_register location to start reading from + @param bytes_to_read Number of bytes to read (max 16 for LEGO compatible devices) + @param buffer (optional) buffer to read the data into + @param buffer_length (optional) length of the buffer if it was provided + @param clear_buffer (optional) to clear the buffer or not before using. + @return pointer to data buffer that was read. If buffer was not provided, this is internal pointer. + */ + uint8_t* readRegisters (uint8_t start_register, uint8_t bytes_to_read, + uint8_t* buffer = 0, uint8_t buffer_length = 0, bool clear_buffer = false); + + /** Read a byte from specified location + @param location address to read at + @return a byte value read from the location + */ + uint8_t readByte (uint8_t location); + + /** Read an integer from specified location. Integer comprises of 2 bytes. + @param location address to read at + @return an integer value read from the location + */ + int16_t readInteger (uint8_t location); + + /** Read a long from specified location. Long comprises of 4 bytes. + @param location address to read at + @return a long value read from the location + */ + uint32_t readLong (uint8_t location); + + /** Read a string from specified location + @param location address to read at + @param bytes_to_read number of bytes to read + @param buffer optional, a buffer to read the data into. + @param buffer_length optional, length of the buffer supplied. + @return a char array read from the location + */ + char* readString (uint8_t location, uint8_t bytes_to_read, + uint8_t* buffer = 0, uint8_t buffer_length = 0); + + + /** write data bytes to the i2c device starting from the start register + @param start_register location to write at. + @param bytes_to_write Number of bytes to write + @param buffer (optional) data buffer, if not supplied, data from internal buffer is used. + */ + bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, + uint8_t* buffer = 0); + + /** write one byte to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeByte (uint8_t location, uint8_t data); + + /** write two bytes (int) to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeInteger(uint8_t location, uint16_t data); + + /** write four bytes (long) to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeLong (uint8_t location, uint32_t data); + + /** validate if a device is attached to the i2c bus with the specified i2c address */ + bool checkAddress(); + + /** set the i2c address for this device + @param i2c_address new device address. + */ + bool setAddress(uint8_t i2c_address); + + /** returns the current address for this instance of BaseI2CDevice */ + uint8_t getAddress(); + + /** returns the error code for an error with the Wire.h library on the i2c bus */ + uint8_t getWriteErrorCode(); + + /** return the firware version id of the device */ + char* getFirmwareVersion(); + + /** return the name of the vendor for the device */ + char* getVendorID(); + + /** get the name of the device */ + char* getDeviceID(); + + /** returns the features on the device, not supported by all devices */ + char* getFeatureSet(); + + /** Buffer used for data that is returned from I2C commands + */ + static uint8_t* _buffer; + + static bool b_initialized; + +protected: + /** write the internal error code + */ + void setWriteErrorCode(uint8_t code); + +private: + uint8_t _device_address; // I2C address of the I2C device + uint8_t _write_error_code; // Error code from last write +}; + +#endif // BASEI2CDEVICE_H diff --git a/EVShield.cpp b/EVShield.cpp new file mode 100644 index 0000000..d8c72e3 --- /dev/null +++ b/EVShield.cpp @@ -0,0 +1,895 @@ + +// EVShield.cpp + +// Initial version: 2010-06-07 by Clinton Blackmore +// Large ports of the code is ported from the NXC library for the device, +// written by Deepak Patil. +// 12/18/2014 Nitin Patil -- modified to work with EVshield +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVShield.h" +#include "Wire.h" +#include "MsTimer2.h" +static void pingEV(); + +#if defined(__AVR__) + static void callbackLED(); +#elif defined(__PIC32MX__) + uint32_t callbackLED(uint32_t); +#endif + +bool btnState_go, btnState_left, btnState_right; +uint8_t redLED, redLED_cp; +uint8_t greenLED, greenLED_cp; +uint8_t blueLED, blueLED_cp; + +bool toggle2 = 0; + +bool format_bin(uint8_t i, char *s) +{ + int j; + int b = 0x80; + + s[0] = '\0'; + for ( j = 0; j < 8; j++) { + if ( i&b ) { + strcat(s, "1"); + } else { + strcat(s, "0"); + } + b = b>>1; + } +} + + +EVShield::EVShield(uint8_t i2c_address_a, uint8_t i2c_address_b) +{ + if ( i2c_address_a != SH_Bank_A) bank_a.setAddress(i2c_address_a); + if ( i2c_address_b != SH_Bank_B) bank_b.setAddress(i2c_address_b); +} + +void EVShield::init(SH_Protocols protocol) +{ + I2CTimer(); + initProtocols(protocol); +} + +void EVShield::initProtocols(SH_Protocols protocol) +{ + m_protocol = protocol; + if (!m_protocol ) { + bank_a._i2c_buffer = bank_a._buffer; + bank_b._i2c_buffer = bank_b._buffer; + } else { + bank_a._i2c_buffer = bank_a._so_buffer; + bank_b._i2c_buffer = bank_b._so_buffer; + } + bank_a.init((void *) this, (SH_BankPort)-1); + bank_b.init((void *) this, (SH_BankPort)-1); + +// ensure firmware compatibility. +// assuming that both banks are identical, +// it's adequate to check on one of the banks + char v[10]; + char d[10]; + char str[100]; + + strcpy(d, bank_a.getDeviceID()); + strcpy(v, bank_a.getFirmwareVersion()); + if ((strcmp(d, "PiStorms") == 0 || + strcmp(d, "EVShld") == 0 ) && + (strcmp(v, "V1.04") == 0 || + strcmp(v, "V1.06") == 0 || + strcmp(v, "V1.07") == 0 || + strcmp(v, "V1.05") == 0 ) ) + { + // firmware is ok for this library + } else { + sprintf (str,"ERROR: Device-ID or Version mismatch. Device-ID: %s, Version: %s", d, v); + Serial.println(str); + while (true) { // stop here with red blinking light. + ledSetRGB(8, 0, 0); + delay(500); + ledSetRGB(0, 0, 0); + delay(500); + } + } + // end of firmware compatibility check +} + +void EVShield::I2CTimer() +{ + //TCNT2 = 0; + MsTimer2::set(300, pingEV); // 300ms period + MsTimer2::start(); +} + +void EVShield::initLEDTimers() +{ + #if defined(__AVR__) + + MsTimer2::set(3, callbackLED); + MsTimer2::start(); +#elif defined(__PIC32MX__) + attachCoreTimerService(callbackLED); +#endif +} + +EVShieldBankB::EVShieldBankB(uint8_t i2c_address) +: EVShieldBank(i2c_address) +{ + +} + +EVShieldBank::EVShieldBank(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ + +} +/* +void EVShield::I2CTimer(){ + //set timer2 interrupt at 64kHz + TCCR2A = 0;// set entire TCCR2A register to 0 + TCCR2B = 0;// same for TCCR2B + TCNT2 = 0;//initialize counter value to 0 + // set compare match register for 64khz increments or 300ms + OCR2A = 74;// = (16*10^6) / (64000*3.3333) - 1 (must be <256) + // turn on CTC mode + TCCR2A |= (1 << WGM21); + // Set CS21 bit for 64 prescaler + TCCR2B |= (1 << CS22); + // enable timer compare interrupt + TIMSK2 |= (1 << OCIE2A); +} +*/ +// provided for backword compatibility with nxshield programs. +int EVShieldBank::nxshieldGetBatteryVoltage() +{ + return evshieldGetBatteryVoltage(); +} +// Voltage value returned in milli-volts. +int EVShieldBank::evshieldGetBatteryVoltage() +{ + int v; + int factor = 47; + v = readByte(SH_VOLTAGE); + return (v * factor); +} + +uint8_t EVShieldBank::EVShieldIssueCommand(char command) +{ + return writeByte(SH_COMMAND, (uint8_t)command); +} + +// Set/get the encoder target for the motor (ie. a position to go +// to and stop at) +bool EVShieldBank::motorSetEncoderTarget(SH_Motor which_motor, long target) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_SETPT_M1 : SH_SETPT_M2; + return writeLong(reg, target); +} + +long EVShieldBank::motorGetEncoderTarget(SH_Motor which_motor) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_SETPT_M1 : SH_SETPT_M2; + return (long)readLong(reg); +} + +// Set/get the speed of the motor +// (I believe this is in the range [-100, +100]) +bool EVShieldBank::motorSetSpeed(SH_Motor which_motor, int speed) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_SPEED_M1 : SH_SPEED_M2; + return writeByte(reg, (uint8_t)(int8_t)speed); +} +int8_t EVShieldBank::motorGetSpeed(SH_Motor which_motor) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_SPEED_M1 : SH_SPEED_M2; + return (int8_t)readByte(reg); +} + +// This is the time, in seconds, for the motor to run +bool EVShieldBank::motorSetTimeToRun(SH_Motor which_motor, int seconds) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_TIME_M1 : SH_TIME_M2; + return writeByte(reg, seconds); +} +uint8_t EVShieldBank::motorGetTimeToRun(SH_Motor which_motor) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_TIME_M1 : SH_TIME_M2; + return readByte(reg); +} + +// Command Register 'B' is currently unused, but reserved for future expansion +// If you set it, you must set it to zero. +bool EVShieldBank::motorSetCommandRegB(SH_Motor which_motor, uint8_t value) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_CMD_B_M1 : SH_CMD_B_M2; + return writeByte(reg, value); +} +uint8_t EVShieldBank::motorGetCommandRegB(SH_Motor which_motor) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_CMD_B_M1 : SH_CMD_B_M2; + return readByte(reg); +} + +// See User's Guide for what command register A does +bool EVShieldBank::motorSetCommandRegA(SH_Motor which_motor, uint8_t value) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_CMD_A_M1 : SH_CMD_A_M2; + return writeByte(reg, value); +} +uint8_t EVShieldBank::motorGetCommandRegA(SH_Motor which_motor) +{ + uint8_t reg = (which_motor == SH_Motor_1) ? SH_CMD_A_M1 : SH_CMD_A_M2; + return readByte(reg); +} + +// Get the current encoder position +int32_t EVShieldBank::motorGetEncoderPosition(SH_Motor which_motor) +{ + uint8_t location = (which_motor == SH_Motor_1) ? SH_POSITION_M1 : SH_POSITION_M2; + return (int32_t)readLong(location); +} + +// See User's Guide for documentation on the status byte +uint8_t EVShieldBank::motorGetStatusByte(SH_Motor which_motor) +{ + uint8_t location = (which_motor == SH_Motor_1) ? SH_STATUS_M1 : SH_STATUS_M2; + return readByte(location); +} + +// (I couldn't find an explanation for this in the User's Guide) +uint8_t EVShieldBank::motorGetTasksRunningByte(SH_Motor which_motor) +{ + uint8_t location = (which_motor == SH_Motor_1) ? SH_TASKS_M1 : SH_TASKS_M2; + return readByte(location); +} + +// Set the PID that controls how we stop as we approach the +// angle we're set to stop at +bool EVShieldBank::motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd) +{ + writeIntToBuffer(_i2c_buffer + 0, Kp); + writeIntToBuffer(_i2c_buffer + 2, Ki); + writeIntToBuffer(_i2c_buffer + 4, Kd); + return writeRegisters(SH_ENCODER_PID, 6); +} + +// Sets the PID that controls how well that motor maintains its speed +bool EVShieldBank::motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd) +{ + writeIntToBuffer(_i2c_buffer + 0, Kp); + writeIntToBuffer(_i2c_buffer + 2, Ki); + writeIntToBuffer(_i2c_buffer + 4, Kd); + return writeRegisters(SH_SPEED_PID, 6); +} + +bool EVShieldBank::centerLedSetRGB(uint8_t R, uint8_t G, uint8_t B) +{ + bool b; + writeByteToBuffer(_i2c_buffer, R); + writeByteToBuffer(_i2c_buffer+1,G); + writeByteToBuffer(_i2c_buffer+2,B); + b = writeRegisters(SH_CENTER_RGB_LED, 3); + delay(1); // required to avoid subsequent i2c errors. + return b; +} +// Set the RGBLED that shows RGB color + +// TODO: it's noticed that i2c call made after ledSetRGB call fails. +// a delay is added to avoid the errors, but +// see why it fails and find a better solution. + +bool EVShieldBank::ledSetRGB(uint8_t R, uint8_t G, uint8_t B) +{ + bool b; + writeByteToBuffer(_i2c_buffer, R); + writeByteToBuffer(_i2c_buffer+1,G); + writeByteToBuffer(_i2c_buffer+2,B); + b = writeRegisters(SH_RGB_LED, 3); + delay(1); // required to avoid subsequent i2c errors. + return b; +} + +// See user's guide for details. +bool EVShieldBank::motorSetPassCount(uint8_t pass_count) +{ + return writeByte(SH_PASS_COUNT, pass_count); +} + +// Sets tolerance which adjust accuracy while positioning. +// See user's guide for more details. +bool EVShieldBank::motorSetTolerance(uint8_t tolerance) +{ + return writeByte(SH_TOLERANCE, tolerance); +} + + +// Special I2C commands + +// Resets all encoder values and motor parameters. Leaves PIDs untouched. +bool EVShieldBank::motorReset() +{ + return EVShieldIssueCommand('R'); +} + +// Tells the motors to start at the same time. +bool EVShieldBank::motorStartBothInSync() +{ + return EVShieldIssueCommand('S'); +} + +// Reset the encoder for motor 1 or motor 2 +bool EVShieldBank::motorResetEncoder(SH_Motor which_motor) +{ + char code = (which_motor == SH_Motor_1) ? 'r' : 's'; + return EVShieldIssueCommand(code); +} + + +// This function sets the speed, the number of seconds, and +// the control (a.k.a. command register A) +bool EVShieldBank::motorSetSpeedTimeAndControl( + SH_Motor which_motors, // Motor_ 1, 2, or Both + int speed, // in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // bit flags for control purposes +{ + if (which_motors == SH_Motor_Both) + { + control &= ~SH_CONTROL_GO; // Clear the 'go right now' flag + bool m1 = motorSetSpeedTimeAndControl(SH_Motor_1, speed, duration, control); + bool m2 = motorSetSpeedTimeAndControl(SH_Motor_2, speed, duration, control); + motorStartBothInSync(); + return m1 && m2; + } + + _i2c_buffer[0] = (uint8_t)(int8_t)speed; + _i2c_buffer[1] = duration; + _i2c_buffer[2] = 0; // command register B + _i2c_buffer[3] = control; // command register A + + uint8_t reg = (which_motors == SH_Motor_1) ? SH_SPEED_M1 : SH_SPEED_M2; + return writeRegisters(reg, 4); +} + +void evshieldSetEncoderSpeedTimeAndControlInBuffer( + uint8_t* buffer, // pointer to the buffer + long encoder, // encoder value + int speed, // speed, in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // control flags +{ + writeLongToBuffer(buffer + 0, encoder); + buffer[4] = (uint8_t)(int8_t)speed; + buffer[5] = duration; + buffer[6] = 0; // command register B + buffer[7] = control; // command register A +} + + +// This function sets the speed, the number of seconds, and +// the control (a.k.a. command register A) +bool EVShieldBank::motorSetEncoderSpeedTimeAndControl( + SH_Motor which_motors, // Motor_ 1, 2, or Both + long encoder, // encoder/tachometer position + int speed, // speed, in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // control flags +{ + if (which_motors == SH_Motor_Both) + { + // The motor control registers are back to back, and both can be written in one command + control &= ~SH_CONTROL_GO; // Clear the 'go right now' flag + evshieldSetEncoderSpeedTimeAndControlInBuffer(_i2c_buffer + 0, encoder, speed, duration, control); + evshieldSetEncoderSpeedTimeAndControlInBuffer(_i2c_buffer + 8, encoder, speed, duration, control); + bool success = writeRegisters(SH_SETPT_M1, 16); + motorStartBothInSync(); + return success; + } + + // Or, just issue the command for one motor + evshieldSetEncoderSpeedTimeAndControlInBuffer(_i2c_buffer, encoder, speed, duration, control); + uint8_t reg = (which_motors == SH_Motor_1) ? SH_SETPT_M1 : SH_SETPT_M2; + return writeRegisters(reg, 8); +} + +// returns 0 when a motor has completed a timed move +uint8_t EVShieldBank::motorIsTimeDone(SH_Motor which_motors) +{ + uint8_t s1, s2; + if (which_motors == SH_Motor_Both) + { + s1 = motorGetStatusByte(SH_Motor_1); + s2 = motorGetStatusByte(SH_Motor_2); + if ( (s1 & SH_STATUS_TIME) == 0 && (s2 & SH_STATUS_TIME) == 0 ) + { + // if stall bit was on there was an error + if ( (s1 & SH_STATUS_STALL) != 0 || (s2 & SH_STATUS_STALL) != 0 ) + { + return SH_STATUS_STALL; + } else { + return 0; + } + } + } else { + s1 = motorGetStatusByte(which_motors); + if ( (s1 & SH_STATUS_TIME) == 0 ) { + if ( (s1 & SH_STATUS_STALL) != 0 ) + { + return SH_STATUS_STALL; + } else { + return 0; + } + } + } + +} + +// waited until a timed command finishes +uint8_t EVShieldBank::motorWaitUntilTimeDone(SH_Motor which_motors) +{ + uint8_t s; + delay(50); // this delay is required for the status byte to be available for reading. + s = motorIsTimeDone(which_motors); // fixed. + while (( s & SH_STATUS_TIME ) != 0 ) { + if ( (s & SH_STATUS_STALL) != 0 ) return SH_STATUS_STALL; + delay (50); + s = motorIsTimeDone(which_motors); // fixed. + } +} + +// True when a command based on using the motor encoder completes +uint8_t EVShieldBank::motorIsTachoDone(SH_Motor which_motors) +{ + uint8_t s1, s2; + if (which_motors == SH_Motor_Both) + { + s1 = motorGetStatusByte(SH_Motor_1); + s2 = motorGetStatusByte(SH_Motor_2); + if ( (s1 & SH_STATUS_TACHO) == 0 && (s2 & SH_STATUS_TACHO) == 0 ) + { + // if stall bit was on there was an error + if ( (s1 & SH_STATUS_STALL) != 0 || (s2 & SH_STATUS_STALL) != 0 ) + { + return SH_STATUS_STALL; + } else { + return 0; + } + } + } else { + s1 = motorGetStatusByte(which_motors); + if ( (s1 & SH_STATUS_TACHO) == 0 ) { + if ( (s1 & SH_STATUS_STALL) != 0 ) + { + return SH_STATUS_STALL; + } else { + return 0; + } + } + } +} + +// waited until a turn-by-degrees command ends +uint8_t EVShieldBank::motorWaitUntilTachoDone(SH_Motor which_motors) +{ + uint8_t s; + delay(50); // this delay is required for the status byte to be available for reading. + s = motorIsTachoDone(which_motors); + while (( s & SH_STATUS_TACHO ) != 0 ) { + if ( (s & SH_STATUS_STALL) != 0 ) return SH_STATUS_STALL; + delay (50); + s = motorIsTachoDone(which_motors); + } +} + + +// Utility functions for motor control + +// Take a speed and direction and give just a speed +inline int calcFinalSpeed(int initialSpeed, SH_Direction direction) +{ + if (direction == SH_Direction_Forward) + return initialSpeed; + return -initialSpeed; +} + +// Calculate the bits that control what happens when this action finishes +inline uint8_t calcNextActionBits(SH_Next_Action next_action) +{ + if (next_action == SH_Next_Action_Brake) + return SH_CONTROL_BRK; + else if (next_action == SH_Next_Action_BrakeHold) + return SH_CONTROL_BRK | SH_CONTROL_ON; +} + +void EVShieldBank::motorRunUnlimited( + SH_Motor which_motors, // Motor_ 1, 2, or Both + SH_Direction direction, // Direction_ Forward or Reverse + int speed) // in range [-100, +100] +{ + uint8_t ctrl = SH_CONTROL_SPEED | SH_CONTROL_GO; + int sp = calcFinalSpeed(speed, direction); + motorSetSpeedTimeAndControl(which_motors, sp, 0, ctrl); +} + +// runs the motors for a given number of seconds +uint8_t EVShieldBank::motorRunSeconds( + SH_Motor which_motors, // Motor_ 1, 2, or Both + SH_Direction direction, // Direction_ Forward or Reverse + int speed, // [-100, +100] + uint8_t duration, // in seconds + SH_Completion_Wait wait_for_completion, // Completion_ Wait_For or Dont_Wait + SH_Next_Action next_action) // Next_Action_ Brake, BrakeHold or Float +{ + uint8_t ctrl = SH_CONTROL_SPEED | SH_CONTROL_TIME | SH_CONTROL_GO; + ctrl |= calcNextActionBits(next_action); + int sp = calcFinalSpeed(speed, direction); + motorSetSpeedTimeAndControl(which_motors, sp, duration, ctrl); + + if (wait_for_completion == SH_Completion_Wait_For) + { + return motorWaitUntilTimeDone(which_motors); + } +} + +// runs the motors until the tachometer reaches a certain position +uint8_t EVShieldBank::motorRunTachometer( + SH_Motor which_motors, // Motor_ 1, 2, or Both + SH_Direction direction, // Direction_ Forward or Reverse + int speed, // [-100, +100] + long tachometer, // in degrees + SH_Move relative, // Move_ Relative or Absolute + SH_Completion_Wait wait_for_completion, // Completion_ Wait_For or Dont_Wait + SH_Next_Action next_action) // Next_Action_ Brake, BrakeHold or Float +{ + uint8_t ctrl = SH_CONTROL_SPEED | SH_CONTROL_TACHO | SH_CONTROL_GO; + ctrl |= calcNextActionBits(next_action); + int final_speed = calcFinalSpeed(speed, direction); + uint8_t s; + + // The tachometer can be absolute or relative. + // If it is absolute, we ignore the direction parameter. + long final_tach = tachometer; + + if (relative == SH_Move_Relative) + { + ctrl |= SH_CONTROL_RELATIVE; + + // a (relative) forward command is always a positive tachometer reading + final_tach = abs(tachometer); + if (final_speed < 0) + { + // and a (relative) reverse command is always negative + final_tach = -final_tach; + } + } + + motorSetEncoderSpeedTimeAndControl(which_motors, final_tach, final_speed, 0, ctrl); + + if (wait_for_completion == SH_Completion_Wait_For) + { + s = motorWaitUntilTachoDone(which_motors); + } + return s; +} + +// Turns the motors the specified number of degrees +uint8_t EVShieldBank::motorRunDegrees( + SH_Motor which_motors, // Motor_ 1, 2, or Both + SH_Direction direction, // Direction_ Forward or Reverse + int speed, // [-100, +100] + long degrees, // in degrees + SH_Completion_Wait wait_for_completion, // Completion_ Wait_For or Dont_Wait + SH_Next_Action next_action) // Next_Action_ Brake, BrakeHold or Float +{ + return motorRunTachometer(which_motors, direction, speed, degrees, + SH_Move_Relative, wait_for_completion, next_action); +} + +// runs the motor(s) the specified number of rotations +uint8_t EVShieldBank::motorRunRotations( + SH_Motor which_motors, // Motor_ 1, 2, or Both + SH_Direction direction, // Direction_ Forward or Reverse + int speed, // [-100, +100] + long rotations, // number of full rotations of the motor + SH_Completion_Wait wait_for_completion, // Completion_ Wait_For or Dont_Wait + SH_Next_Action next_action) // Next_Action_ Brake, BrakeHold or Float +{ + return motorRunTachometer(which_motors, direction, speed, 360 * rotations, + SH_Move_Relative, wait_for_completion, next_action); +} + +// The stop command will only stop the motor(s) by making them float/coast +// or brake. Even if you specify Next_Action_BrakeHold, the motor +// will only brake, not hold. +bool EVShieldBank::motorStop(SH_Motor which_motors, SH_Next_Action next_action) +{ + if (which_motors >= SH_Motor_1 && which_motors <= SH_Motor_Both) + { + // The magic variables become clear in the user's guide + uint8_t base_code = (next_action != SH_Next_Action_Float) ? 'A' - 1 : 'a' - 1; + + return EVShieldIssueCommand(base_code + which_motors); + } + + setWriteErrorCode(5); // bad parameters + return false; +} + +bool EVShieldBank::sensorSetType(uint8_t which_sensor, uint8_t sensor_type) +{ + /* + * which_sensor can only be 1 or 2, + * reject any other value + */ + switch (which_sensor) { + case 1: + return writeByte(SH_S1_MODE, sensor_type); + break; + case 2: + return writeByte(SH_S2_MODE, sensor_type); + break; + default: + return false; + break; + } + return false; +} + +/* register locations + unsigned char Sensor1_mode; //0x8A + unsigned char Sensor2_mode; //0x8B + unsigned int Sensor_1_reading; //0x70 + unsigned int Sensor_2_reading; //0x8E +*/ +int EVShieldBank::sensorReadRaw(uint8_t which_sensor) +{ + /* + * sensor can only be 1 or 2, + * otherwise return -1; + */ + switch (which_sensor) { + case 1: + return readInteger(SH_S1_ANALOG); + break; + case 2: + return readInteger(SH_S2_ANALOG); + break; + default: + return -1; + break; + } +} + +bool EVShieldBankB::sensorSetType(uint8_t which_sensor, uint8_t sensor_type) +{ + /* + * which_sensor can only be 1 or 2, + * reject any other value + */ + + + switch (which_sensor) { + case 1: + return EVShieldBankB::writeByte(SH_S1_MODE, sensor_type); + break; + case 2: + return EVShieldBankB::writeByte(SH_S2_MODE, sensor_type); + break; + default: + return false; + break; + } + return false; +} + +int EVShieldBankB::sensorReadRaw(uint8_t which_sensor) +{ + int a; + switch (which_sensor) { + case 1: + // sensor port 1 behaves same as BankA + // so call parent function. + return EVShieldBankB::readInteger(SH_S1_ANALOG); + break; + + case 2: + return EVShieldBankB::readInteger(SH_S2_ANALOG); + break; + default: + return -1; + break; + } +} + +void pingEV() +{ + TWCR = (1<>1; + greenLED_cp = greenLED_cp >>1; + blueLED_cp = blueLED_cp >>1; + index ++; + } + +} +#elif defined(__PIC32MX__) +uint32_t callbackLED(uint32_t currentTime) +{ + static uint8_t index = 1; + + //pinMode(BTN_GO,INPUT); + //btnState_go = !digitalRead(BTN_GO); + //pinMode(BTN_GO,OUTPUT); + + pinMode(BTN_LEFT,INPUT); + btnState_left = !digitalRead(BTN_LEFT); + pinMode(BTN_LEFT,OUTPUT); + + pinMode(BTN_RIGHT,INPUT); + btnState_right = !digitalRead(BTN_RIGHT); + pinMode(BTN_RIGHT,OUTPUT); + + digitalWrite(LED_RED, !redLED_cp&0x01); + digitalWrite(LED_GREEN, !greenLED_cp&0x01); + digitalWrite(LED_BLUE, !blueLED_cp&0x01); + + if (index == 8){ + index = 1; + redLED_cp = redLED; + greenLED_cp = greenLED; + blueLED_cp = blueLED; + } + else{ + redLED_cp = redLED_cp >>1; + greenLED_cp = greenLED_cp >>1; + blueLED_cp = blueLED_cp >>1; + index ++; + } + return (currentTime + CORE_TICK_RATE*3); +} + +#endif + +bool EVShield::getButtonState(uint8_t btn) { + uint8_t bVal; + bVal = bank_a.readByte(SH_BTN_PRESS); + + return (bVal == btn); +} + +void EVShield::waitForButtonPress(uint8_t btn, uint8_t led_pattern) { + while(!getButtonState(btn)){ + switch (led_pattern) { + case 1: + ledBreathingPattern(); + break; + case 2: + ledHeartBeatPattern(); + break; + default: + delay (300); + break; + } + } + if (led_pattern != 0) ledSetRGB(0,0,0); +} + +void EVShield::ledBreathingPattern() { + static int breathNow = 0; + int i; + + if ( breathNow > 800 && breathNow < 6400 ) { + // LED intensity rising + i = breathNow/800; + ledSetRGB(0, i, i); + delayMicroseconds(150); + if ( i == 8 ) delayMicroseconds(200); + } else if (breathNow > 6400 && breathNow < 13400 ) { + // LED intensity falling + i = (14400-breathNow)/1000; + ledSetRGB(0, i, i); + delayMicroseconds(200); + if ( i == 8 ) delayMicroseconds(200); + } else { + // LED intensity stable. + ledSetRGB(0,1,1); + delayMicroseconds(50); + } + breathNow ++; +} + +void EVShield::ledSetRGB(uint8_t red, uint8_t green, uint8_t blue) +{ + bank_a.ledSetRGB(red,green,blue); + delay(100); + bank_b.ledSetRGB(red,green,blue); + delay(100); +} + +void EVShield::ledHeartBeatPattern() { + static int breathNow = 0; + int i; + + if ( breathNow > 800 && breathNow < 6400 ) { + // LED intensity rising + i = breathNow/800; + ledSetRGB(0, i, i); + //delayMicroseconds(150); + if ( i == 8 ) delayMicroseconds(200); + } else if (breathNow > 6400 && breathNow < 13400 ) { + // LED intensity falling + i = (14400-breathNow)/1000; + ledSetRGB(0, i, i); + //delayMicroseconds(200); + if ( i == 8 ) delayMicroseconds(200); + } else { + // LED intensity stable. + ledSetRGB(0,1,1); + delayMicroseconds(10); + } + breathNow ++; +} + diff --git a/EVShield.h b/EVShield.h new file mode 100644 index 0000000..c2a7aa3 --- /dev/null +++ b/EVShield.h @@ -0,0 +1,762 @@ + +/** \file EVShield.h +* EVShield.h defines main interfaces used in the EVShield library. + \mainpage EVShield Library Reference + \section intro_sec Introduction + EVShield library provides interfaces to use EVShield by OpenElectrons.com on Arduino. + + At the time of this writing, EVShield and this library can be used with following boards: + + Arduino boards:\n + Uno, Uno R3\n + Duemilanove\n + + + \section getting_started Getting Started + If you need help to begin with your first program, please download and review EVShield-AVR-Library-Tutorial.pdf + from following url: http://www.openelectrons.com/docs/viewdoc/25 + + \section more_info More Information + More information about EVShield is available at: http://www.openelectrons.com/evshield + + Online documentation of this Library Reference is available at: + http://www.openelectrons.com/EVShield/html/ + (Note however, the online version may not match exactly with the library files you have installed on your computer). + + \section install_sec Installation Instructions + To install this library in your Arduino IDE, download the latest zip file from following location: + http://www.openelectrons.com/evshield + + And follow the instructions at that url to install it on your computer. +*/ + +/* + * EVShield interface library + * Copyright (C) 2015initProtocols mindsensors.com + * 12/18/2014 Nitin Patil -- modified to work with EVshield + * + * This file is part of EVShield interface library. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + + * This library 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 + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef EVShield_H +#define EVShield_H + +#include "SHDefines.h" + +// Motor control related constants. +#define SH_CONTROL_SPEED 0x01 +#define SH_CONTROL_RAMP 0x02 +#define SH_CONTROL_RELATIVE 0x04 +#define SH_CONTROL_TACHO 0x08 +#define SH_CONTROL_BRK 0x10 +#define SH_CONTROL_ON 0x20 +#define SH_CONTROL_TIME 0x40 +#define SH_CONTROL_GO 0x80 + +#define SH_STATUS_SPEED 0x01 +#define SH_STATUS_RAMP 0x02 +#define SH_STATUS_MOVING 0x04 +#define SH_STATUS_TACHO 0x08 +#define SH_STATUS_BREAK 0x10 +#define SH_STATUS_OVERLOAD 0x20 +#define SH_STATUS_TIME 0x40 +#define SH_STATUS_STALL 0x80 + +#define SH_COMMAND 0x41 +#define SH_VOLTAGE 0x6E + +#define SH_SETPT_M1 0x42 +#define SH_SPEED_M1 0x46 +#define SH_TIME_M1 0x47 +#define SH_CMD_B_M1 0x48 +#define SH_CMD_A_M1 0x49 + +#define SH_SETPT_M2 0x4A +#define SH_SPEED_M2 0x4E +#define SH_TIME_M2 0x4F +#define SH_CMD_B_M2 0x50 +#define SH_CMD_A_M2 0x51 + +/* + * Read registers. + */ +#define SH_POSITION_M1 0x52 +#define SH_POSITION_M2 0x56 +#define SH_STATUS_M1 0x5A +#define SH_STATUS_M2 0x5B +#define SH_TASKS_M1 0x5C +#define SH_TASKS_M2 0x5D + +#define SH_ENCODER_PID 0x5E +#define SH_SPEED_PID 0x64 +#define SH_PASS_COUNT 0x6A +#define SH_TOLERANCE 0x6B + +#define SH_S1_MODE 0x6F +#define SH_S1_EV3_MODE 0x6F +#define SH_S1_ANALOG 0x70 + +#define SH_S2_MODE 0xA3 +#define SH_S2_EV3_MODE 0x6F +#define SH_S2_ANALOG 0xA4 + +#define SH_BTN_PRESS 0xDA +#define SH_RGB_LED 0xD7 +#define SH_CENTER_RGB_LED 0xDE + +/* constants to be used by user programs */ +/** + * \enum SH_Motor Motor selection related constants + */ +typedef enum { + SH_Motor_1 = 0x01, /*!< Choose Motor 1 for selected operation */ + SH_Motor_2 = 0x02, /*!< Choose Motor 2 for selected operation */ + SH_Motor_Both = 0x03 /*!< Choose Both Motors for selected operation */ +} SH_Motor; + +/* + * \enum SH_Next_Action Next action related constants + */ +typedef enum { + SH_Next_Action_Float = 0x00, /*!< stop and let the motor coast. */ + SH_Next_Action_Brake = 0x01, /*!< apply brakes, and resist change to tachometer, but if tach position is forcibly changed, do not restore position */ + SH_Next_Action_BrakeHold = 0x02 /*!< apply brakes, and restore externally forced change to tachometer */ +} SH_Next_Action; + +/** + * \enum SH_Direction Motor direction related constants. + */ +typedef enum { + SH_Direction_Reverse = 0x00, /*!< Run motor in reverse direction */ + SH_Direction_Forward = 0x01 /*!< Run motor in forward direction */ +} SH_Direction; + +/* + * \enum SH_Move Tachometer movement related constants + */ +typedef enum { + SH_Move_Absolute = 0x00, /*!< Move the tach to absolute value provided */ + SH_Move_Relative = 0x01 /*!< Move the tach relative to previous position */ +} SH_Move; + +/* + * \enum SH_Completion_Wait Whether to wait for motor to finish it's current task or not + */ +typedef enum { + SH_Completion_Dont_Wait = 0x00, /*!< Don't wait for motor to finish, program will continue with next function */ + SH_Completion_Wait_For = 0x01 /*!< Wait for motor to finish, program will wait until current function finishes it's operation */ +} SH_Completion_Wait; + +/* + * Speed constants, these are just convenience constants, + * You can use any value between 0 and 100. + */ +#define SH_Speed_Full 90 +#define SH_Speed_Medium 60 +#define SH_Speed_Slow 25 + +/* + * EVShield has two banks, and each of them has different I2C address. + * each bank has 2 motors and 2 sensors. + * + */ +/*! + \def SH_Bank_A + I2C address of bank A +*/ +#define SH_Bank_A 0x34 +/*! + \def SH_Bank_B + I2C address of bank B +*/ +#define SH_Bank_B 0x36 + + +/* + * Sensor type primitives + * + */ + + /*! + \def SH_Type_NONE + In this type the sensor port is not defined and used. +*/ +#define SH_Type_NONE 0x00 + +#define SH_Type_SWITCH 0x01 + +/*! + \def SH_Type_ANALOG_PASSIVE + In this type the sensor port is not powered (for sensors like touch sensor). +*/ +#define SH_Type_ANALOG 0x02 + + +#define SH_Type_LIGHT_REFLECTED 0x03 +/*! + \def SH_Type_LIGHT_ACTIVE + Useed for Refelected Light sensors, +*/ +#define SH_Type_LIGHT_AMBIENT 0x04 +/*! + \def SH_Type_I2C + In this type the sensor connected should be an i2c device. +*/ +#define SH_Type_I2C 0x09 + +/*! + \def SH_Type_COLORFULL + In this type the sensor connected is NXT color sensor in color mode +*/ +#define SH_Type_COLORFULL 13 +/*! + \def SH_Type_COLORRED + In this type the sensor connected is NXT color sensor in RED color mode +*/ +#define SH_Type_COLORRED 14 +/*! + \def SH_Type_COLORGREEN + In this type the sensor connected is NXT color sensor in GREEN color mode +*/ +#define SH_Type_COLORGREEN 15 +/*! + \def SH_Type_COLORBLUE + In this type the sensor connected is NXT color sensor in BLUE color mode +*/ +#define SH_Type_COLORBLUE 16 +/*! + \def SH_Type_COLORNONE + In this type the sensor connected is NXT color sensor in ambient light mode +*/ +#define SH_Type_COLORNONE 17 +/*! + \def SH_Type_EV3_SWITCH + In this type the sensor connected is EV3 touch sensor +*/ +#define SH_Type_EV3_SWITCH 18 +/*! + \def SH_Type_EV3 + In this type the sensor connected is EV3 UART sensor +*/ +#define SH_Type_EV3 19 + + + + + +/* + * Sensor defines. + */ +/*! + \def SH_S1 + This is used internally to address Sensor Port 1. + Do not use this in sketches. + Sketches should use SH_BankPort enums. +*/ +#define SH_S1 1 +/*! + \def SH_S2 + This is used internally to address Sensor Port 2. + Do not use this in sketches. + Sketches should use SH_BankPort enums. +*/ +#define SH_S2 2 + +#include "EVShieldI2C.h" +#if defined(__AVR__) + #include + #include +#endif + +/** + @brief This class defines methods for the EVShield Bank(s). + */ +class EVShieldBank : public EVShieldI2C +{ +public: + /** Constructor for bank a of the EVShield device */ + EVShieldBank(uint8_t i2c_address = SH_Bank_A); + + /** Get the battery voltage (milli-volts) for this bank of the EVShield + @return voltage value in milli-volts + The voltage reported by this function is actual voltage at VIN pin on Arduino + This will be lower than your supply voltage due to drops at various points in the circuit. + The drop will be different based on where the power source is connected. + (i.e. source through EVShield Green connector Vs Arduino black adapater Vs Arduino USB.) + */ + int evshieldGetBatteryVoltage(); + + /** nxshieldGetBatteryVoltage() is provided for backword compatibility with nxshield programs. + */ + int nxshieldGetBatteryVoltage(); + + /** + Issue a command to this bank of the EVShield + @param command Refer to user guide for list of commands. + */ + uint8_t EVShieldIssueCommand(char command); + + // + // Motor Operation APIs. + // + /** Set the target encoder position for the motor + @param which_motor Provide which motor to operate on + @param target Encode value to achieve + */ + bool motorSetEncoderTarget(SH_Motor which_motor, long target); + + /** + Get the target encoder position for the motor + @param which_motor Provide which motor to operate on + @return long encoder value that the motor is trying to achieve. + */ + long motorGetEncoderTarget(SH_Motor which_motor); + + /** + Set the speed of the motor + @param which_motor Provide which motor to operate on + @param speed The speed value between 0 and 100 + */ + bool motorSetSpeed(SH_Motor which_motor, int speed); + + /** + Get the speed of the motor + @param which_motor Provide which motor to operate on + @return the speed value set to the motor + */ + int8_t motorGetSpeed(SH_Motor which_motor); + + /** + Set the time in seconds for which the motor should run for + @param which_motor Provide which motor to operate on + @param seconds The time duration the motor should run + */ + bool motorSetTimeToRun(SH_Motor which_motor, int seconds); + + /** + Get the time in seconds that the motor is running for + @param which_motor Provide which motor to operate on + @return time the motor has been running since last start. + */ + uint8_t motorGetTimeToRun(SH_Motor which_motor); + + /** + Set the Command Register B + There are two command registers, A and B. + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + + @param which_motor Provide which motor to operate on + @param value The command register value to set + */ + bool motorSetCommandRegB(SH_Motor which_motor, uint8_t value); + /** + Get the command register B + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + @param which_motor Provide which motor to operate on + @return the last set command register value. + */ + uint8_t motorGetCommandRegB(SH_Motor which_motor); + /** + Set the Command Register A + There are two command registers, A and B. + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + @param which_motor Provide which motor to operate on + @param value The command register value to set + */ + bool motorSetCommandRegA(SH_Motor which_motor, uint8_t value); + /** + Get the command register A + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + @param which_motor Provide which motor to operate on + @return the last set command register value. + */ + uint8_t motorGetCommandRegA(SH_Motor which_motor); + + /** + Get the current encoder position of the motor in degrees + @param which_motor Provide which motor to operate on + @return current encoder value + */ + int32_t motorGetEncoderPosition(SH_Motor which_motor); + + /** + Get the current status of the motor + @param which_motor Provide which motor to operate on + @return The current status of the motor. + This is a byte with various bits set based on motor's state. + Refer to User Guide for details of bits. + */ + uint8_t motorGetStatusByte(SH_Motor which_motor); + + /** + Get the tasks that are running on the specific motor + @param which_motor Provide which motor to operate on + @return The task byte that's currently running for this motor. + (Currently only one task is supported.) + */ + uint8_t motorGetTasksRunningByte(SH_Motor which_motor); + + /** + Set the PID control factors for the encoders + All motors on this bank will use the same PID values. + @param Kp The proportionate factor of the PID. + @param Ki The integreal factor of the PID. + @param Kd The differential factor of the PID. + */ + bool motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd); + + /** + Set the PID control factors for the speed of the motors + All motors on this bank will use the same PID values. + @param Kp The proportionate factor of the PID. + @param Ki The integreal factor of the PID. + @param Kd The differential factor of the PID. + */ + bool motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd); + + bool centerLedSetRGB(uint8_t R, uint8_t G, uint8_t B); + + // Set the RGBLED that shows RGB color + + bool ledSetRGB(uint8_t R, uint8_t G, uint8_t B); + + /** + Set how many times the PID controller is allowed to oscillate at the set point + Depending on your situation of load and power characteristics, your PID algorithm + may oscillate indefinitly trying to achieve it's target. + To prevent that from happening there is a limit set. + @param pass_count the maximum number of times the PID is allowed to cross it's target. + */ + bool motorSetPassCount(uint8_t pass_count); + + /** + Set how far away from the set point the PID controller is allowed to oscillate (amplitude) + Depending on your situation of load and power characteristics, your PID algorithm + may oscillate above or below the target. + @param tolerance the maximum amplititude allowed. + */ + bool motorSetTolerance(uint8_t tolerance); + + /** + Reset all the set values for the motors + Applies to all motors on this bank. + */ + bool motorReset(); + + /** + Start both motors at the same time to follow the set conditions + This will execute the commands specified in the command register on both motors at once. + */ + bool motorStartBothInSync(); + + /** + Reset the current encoder position to zero for the motor + @param which_motor Provide which motor to operate on + */ + bool motorResetEncoder(SH_Motor which_motor); + + /** + Set the speed, duration to run, and control for the motor through register A (or B) + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + @param which_motors Provide which motor(s) to operate on + @param speed Speed value between 0 and 100 + @param duration time to run in seconds + @param control command register value + */ + bool motorSetSpeedTimeAndControl(SH_Motor which_motors, int speed, + uint8_t duration, uint8_t control); + + /** + This function sets the speed, the number of seconds, and + the control (a.k.a. command register A) + + For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url: + http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1 + @param which_motors Provide which motor(s) to operate on + @param encoder Target encoder position to achieve + @param speed Speed value between 0 and 100 + @param duration time to run in seconds + @param control command register value + */ + bool motorSetEncoderSpeedTimeAndControl(SH_Motor which_motors, + long encoder, int speed, + uint8_t duration, uint8_t control); + + /** + Validate if the motor has finished running for the set time duration + @param which_motors Provide which motor(s) to operate on + @return 0 when motor(s) has completed a timed move properly, + If the return value is non-zero, either motor has not finished yet or has encountered an error condition. + */ + uint8_t motorIsTimeDone(SH_Motor which_motors); + + /** + Wait until the motor has finished running for its set respective time duration + @param which_motors Provide which motor(s) to operate on + @return function waits until when motor(s) has stopped, returns 0 if the set goal was achieved. + If the return value is non-zero, you should check for error condition such as stall. + */ + uint8_t motorWaitUntilTimeDone(SH_Motor which_motors); + + /** + Validate if the motor has reached its set target tachometer position + @param which_motors Provide which motor(s) to operate on + @return 0 when motor(s) has completed a encoder based move properly, + If the return value is non-zero, either motor has not finished yet or has encountered an error condition. + */ + uint8_t motorIsTachoDone(SH_Motor which_motors); + + /** + Wait until the motor has reached its set target tachometer position + @param which_motors Provide which motor(s) to operate on + @return function waits until when motor(s) has stopped, returns 0 if the set goal was achieved. + If the return value is non-zero, you should check for error condition such as stall. + */ + uint8_t motorWaitUntilTachoDone(SH_Motor which_motors); + + /** + Run the motor endlessly at the desired speed in the desired direction + @param which_motors specifiy the motor(s) to operate on + @param direction specifiy the direction to run the motor + @param speed the speed value (between 0 and 100) + @return Starts the motors and function returns immediately + */ + void motorRunUnlimited(SH_Motor which_motors, SH_Direction direction, + int speed); + + /** Run the motor for a set duration at a set speed and do the next action + @param which_motors specifiy the motor(s) to operate on + @param direction specifiy the direction to run the motor + @param speed the speed value (between 0 and 100) + @param duration in seconds + @param wait_for_completion whether this API should wait for competion or not + @param next_action for these motor being operated on + @return 0 if the operation was finished satisfactorily, + in case return value is non-zero you should check for the bits for error conditions. + */ + uint8_t motorRunSeconds(SH_Motor which_motors, SH_Direction direction, + int speed, uint8_t duration, + SH_Completion_Wait wait_for_completion, + SH_Next_Action next_action); + + /** + run until the tachometer target has been reached and do next action + @param which_motors specifiy the motor(s) to operate on + @param direction specifiy the direction to run the motor + @param speed the speed value (between 0 and 100) + @param tachometer the target for the encoder value to achieve. + @param relative is the tachometer relative or absolute. + @param wait_for_completion whether this API should wait for competion or not + @param next_action for these motor being operated on + @return 0 if the operation was finished satisfactorily, + in case return value is non-zero you should check for the bits for error conditions. + */ + uint8_t motorRunTachometer(SH_Motor which_motors, SH_Direction direction, + int speed, long tachometer, + SH_Move relative, + SH_Completion_Wait wait_for_completion, + SH_Next_Action next_action); + + /** + Run the motor for a set number of degrees and proceed to the next action + @param which_motors specifiy the motor(s) to operate on + @param direction specifiy the direction to run the motor + @param speed the speed value (between 0 and 100) + @param degrees The degrees the motor should turn through + @param wait_for_completion whether this API should wait for competion or not + @param next_action for these motor being operated on + @return 0 if the operation was finished satisfactorily, + in case return value is non-zero you should check for the bits for error conditions. + */ + uint8_t motorRunDegrees(SH_Motor which_motors, SH_Direction direction, + int speed, long degrees, + SH_Completion_Wait wait_for_completion, + SH_Next_Action next_action); + + /** + Run the motor for a set number of complete rotations and proceed to the next action + @param which_motors specifiy the motor(s) to operate on + @param direction specifiy the direction to run the motor + @param speed the speed value (between 0 and 100) + @param rotations The rotations the motor should rotate through + @param wait_for_completion whether this API should wait for competion or not + @param next_action for these motor being operated on + @return 0 if the operation was finished satisfactorily, + in case return value is non-zero you should check for the bits for error conditions. + */ + uint8_t motorRunRotations(SH_Motor which_motors, SH_Direction direction, + int speed, long rotations, + SH_Completion_Wait wait_for_completion, + SH_Next_Action next_action); + + /** + stop the motor and do the next action + @param which_motors specifiy the motor(s) to operate on + @param next_action for these motor being operated on + */ + bool motorStop(SH_Motor which_motors, SH_Next_Action next_action); + + + // + // EVShield sensor functions. + // +public: + /** + Set the sensor type of the sensor on this bank + @param which_sensor the sensor to set the type to. + @param sensor_type type value of the sensor, + refer to Advanced User Guide for available values of sensor types. + */ + bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type); + + /** + Read the raw analog value from the sensor and return as an int + @param which_sensor the sensor to read the raw value from + @return raw value from the sensor + */ + int sensorReadRaw(uint8_t which_sensor); + +}; + +/** + @brief EVShield has two banks. Bank B has few differences from Bank A. + This class defines overriding methods for the EVShield Bank B. + */ +class EVShieldBankB : public EVShieldBank +{ +private: + +public: + /** constructor for bank be of the EVShield; optional custom i2c address can be supplied */ + EVShieldBankB(uint8_t i2c_address_b = SH_Bank_B); + /** + Read the raw analog value from the sensor and return as an int + @param which_sensor the sensor to read the raw value from + @return raw value from the sensor + */ + int sensorReadRaw(uint8_t which_sensor); + + /** + Set the sensor Type of the sensor on this bank + @param which_sensor the sensor to set the type to. + @param sensor_type type value of the sensor, + refer to Advanced User Guide for available values of sensor types. + */ + bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type); +}; + + +/** + @brief This class defines methods to access EVShield features +*/ +class EVShield +{ +public: + /** + Global variable representing the i2c protocol to use; whether software or hardware + */ + uint8_t m_protocol; + /** Variable for the bank_a of EVShield + */ + EVShieldBank bank_a; + /** Variable for the bank_b of EVShield + */ + EVShieldBankB bank_b; + + /** class constructor for EVShield; optional custom i2c addresses may be supplied for both banks */ + EVShield(uint8_t i2c_address_a = SH_Bank_A, + uint8_t i2c_address_b = SH_Bank_B); + + /** + the initialization of the EVShield; + This function initializes the LED related timers, and communication protocols. + @param protocol optional, specify the i2c protocol to use for the EVShield and highspeed i2c port + */ + void init(SH_Protocols protocol=SH_HardwareI2C); + + /** + the initialization of the EVShield LED timers. + */ + void initLEDTimers(); + + /** + the initialization of the EVShield I2C timer. + */ + void I2CTimer(); + + /** + the initialization of EVShield communication protocols. + @param protocol optional, specify the i2c protocol to use for the EVShield and highspeed i2c port + */ + void initProtocols(SH_Protocols protocol=SH_HardwareI2C); + + + /** + Get the button state of the specific button on EVShield. + @param btn Button to get state for (BTN_GO, BTN_LEFT, BTN_RIGHT) + @return true or false for specified button on the EVShield + */ + bool getButtonState(uint8_t btn); + + /** + Wait inside function until specified button is pressed on EVShield (BTN_GO, BTN_LEFT, BTN_RIGHT) + @param btn Button to get state for (BTN_GO, BTN_LEFT, BTN_RIGHT) + @param led_pattern 0 for LED off. + 1 to brighten/lighten LED with breathing pattern (default). + 2 to brighten/lighten LED with heart beat pattern. + */ + void waitForButtonPress(uint8_t btn, uint8_t led_pattern=0); + + + /** + Set the colors of LED on the EVShield; + The values of red, green, blue are between 0 to 8 (for 8 intensity levels). + @param red Intensity for red color (between 0 and 8) + @param green Intensity for green color (between 0 and 8) + @param blue Intensity for blue color (between 0 and 8) + */ + void ledSetRGB(uint8_t red = 0, uint8_t green = 0, uint8_t blue = 0); + + /** + The LED is brightened and dimmed in a breathing pattern. + Call this function repeatedly to make the pattern. + */ + void ledBreathingPattern(); + + /** + The LED is brightened and dimmed in a HeartBeat pattern. + Call this function repeatedly to make the pattern. + */ + void ledHeartBeatPattern(); +}; + +/** This function formats an integer in binary format. + @param i 8 bit integer value + @param s returned string of the binary representation + */ +extern bool format_bin(uint8_t i, char *s); + +#endif diff --git a/EVShieldAGS.cpp b/EVShieldAGS.cpp new file mode 100644 index 0000000..ff5537d --- /dev/null +++ b/EVShieldAGS.cpp @@ -0,0 +1,76 @@ + +/* + 12/18/2014 Nitin Patil -- modified to work with EVshield + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVShieldAGS.h" + +EVShieldAGS::EVShieldAGS() +{ + mp_shield = NULL; +} + +EVShieldAGS::EVShieldAGS(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; +} + +bool EVShieldAGS::setType(uint8_t type) +{ + if ( mp_shield == NULL) return false; + switch (m_bp) { + case SH_BAS1: + return mp_shield->bank_a.sensorSetType(SH_S1, type); + break; + case SH_BAS2: + return mp_shield->bank_a.sensorSetType(SH_S2, type); + break; + case SH_BBS1: + return mp_shield->bank_b.sensorSetType(SH_S1, type); + break; + case SH_BBS2: + return mp_shield->bank_b.sensorSetType(SH_S2, type); + break; + } +} + +int EVShieldAGS::readRaw() +{ + if ( mp_shield == NULL) return -1; + + switch (m_bp) { + case SH_BAS1: + return mp_shield->bank_a.sensorReadRaw(SH_S1); + break; + case SH_BAS2: + return mp_shield->bank_a.sensorReadRaw(SH_S2); + break; + case SH_BBS1: + return mp_shield->bank_b.sensorReadRaw(SH_S1); + break; + case SH_BBS2: + return mp_shield->bank_b.sensorReadRaw(SH_S2); + break; + } +} + +bool EVShieldAGS::init(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; + return true; +} diff --git a/EVShieldAGS.h b/EVShieldAGS.h new file mode 100644 index 0000000..02c1cd3 --- /dev/null +++ b/EVShieldAGS.h @@ -0,0 +1,60 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + 12/18/2014 Nitin Patil -- modified to work with EVshield + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVShieldAGS_H +#define EVShieldAGS_H + +#include "SHDefines.h" +#include "EVShield.h" + +/** + @brief EVShield Analog Sensor class. + */ +class EVShieldAGS +{ +public: + /** pointer to the EVShield class instantiation used */ + EVShield * mp_shield; + + /** bank port the analog device is connected to */ + SH_BankPort m_bp; + + /** null constructor for the EVShieldAGS class; need to init later */ + EVShieldAGS(); + + /** class constructor with pointed to EVShield and the bankport as a parameter; init is not needed */ + EVShieldAGS(EVShield * shield, SH_BankPort bp); + + /** set the type of the device on this port of the EVShield */ + bool setType(uint8_t type); + + /** read the raw analog value from the device and return as an integer */ + int readRaw(); + + /** initialize the analog device with a pointed to the EVShield and the bank port it is connected to */ + bool init(EVShield * shield, SH_BankPort bp); + +}; + + +#endif + diff --git a/EVShieldI2C.cpp b/EVShieldI2C.cpp new file mode 100644 index 0000000..7463041 --- /dev/null +++ b/EVShieldI2C.cpp @@ -0,0 +1,173 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVShieldI2C.h" +#include "EVShield.h" +//bool toggle2 = 0; + +EVShieldI2C::EVShieldI2C(uint8_t i2c_address) + : BaseI2CDevice(i2c_address), SoftI2cMaster(i2c_address) +{ +} + +uint8_t EVShieldI2C::readByte (uint8_t location) +{ + if (!m_protocol) return BaseI2CDevice::readByte( location ); + else return SoftI2cMaster::readByte( location ); +} + + +uint16_t EVShieldI2C::readInteger (uint8_t location) +{ + if (!m_protocol) return BaseI2CDevice::readInteger( location ); + else return SoftI2cMaster::readInteger( location ); +} + + +uint32_t EVShieldI2C::readLong (uint8_t location) +{ + if (!m_protocol) return BaseI2CDevice::readLong( location ); + else return SoftI2cMaster::readLong( location ); +} + + +uint8_t* EVShieldI2C::readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t* buf) +{ + if (!m_protocol) return BaseI2CDevice::readRegisters(startRegister, bytes, buf); + else return SoftI2cMaster::readRegisters(startRegister, bytes, buf); +} + + +char* EVShieldI2C::readString (uint8_t location, uint8_t bytes_to_read, + uint8_t* buffer, uint8_t buffer_length) +{ + if (!m_protocol) return BaseI2CDevice::readString(location, bytes_to_read, buffer, buffer_length); + else return SoftI2cMaster::readString(location, bytes_to_read, buffer, buffer_length); +} + + +bool EVShieldI2C::writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t* buffer) +{ + if (!m_protocol) return BaseI2CDevice::writeRegisters(start_register, bytes_to_write, buffer); + else return SoftI2cMaster::writeRegisters(start_register, bytes_to_write, buffer); +} + +bool EVShieldI2C::writeByte (uint8_t location, uint8_t data) +{ + uint8_t dd[3]; + if (!m_protocol) { + BaseI2CDevice::writeByte(location, data); + } else { + SoftI2cMaster::writeByte(location, data); + } + return true; +} + +bool EVShieldI2C::writeInteger(uint8_t location, uint16_t data) +{ + if (!m_protocol) return BaseI2CDevice::writeInteger(location, data); + else return SoftI2cMaster::writeInteger(location, data); +} + +bool EVShieldI2C::writeLong (uint8_t location, uint32_t data) +{ + if (!m_protocol) return BaseI2CDevice::writeLong(location, data); + else return SoftI2cMaster::writeLong(location, data); +} + +uint8_t EVShieldI2C::getErrorCode ( ) +{ + if (!m_protocol) return BaseI2CDevice::getWriteErrorCode(); + else return SoftI2cMaster::getWriteErrorCode(); +} + +bool EVShieldI2C::checkAddress ( ) +{ + if (!m_protocol) return BaseI2CDevice::checkAddress(); + else return SoftI2cMaster::checkAddress(); +} + +bool EVShieldI2C::setAddress (uint8_t address) +{ + // regardless of protocol, set the address + BaseI2CDevice::setAddress(address); + SoftI2cMaster::setAddress(address); + return true; +} + + +// READ INFORMATION OFF OF THE DEVICE +// returns a string with the current firmware version of the device +char* EVShieldI2C::getFirmwareVersion() +{ + return readString(0, 8); +} + +// returns a string indicating the vendor of the device +char* EVShieldI2C::getVendorID() +{ + return readString(0x08, 8); +} + +// returns a string indicating the device's ID +char* EVShieldI2C::getDeviceID() +{ + return readString(0x10, 8); +} +// returns a string indicating the features on this device +// some devices may return null. +char* EVShieldI2C::getFeatureSet() +{ + return readString(0x18, 8); +} + +void EVShieldI2C::init(void * shield, SH_BankPort bp) +{ + mp_shield = shield; + // on all banks hardware as well as software protocols are possible. + // so store the main shield's protocol value with us. + // and initialize with appropriate function + // + // For BAS2, BBS1, BBS2 only software i2c is possible. + m_protocol = ((EVShield *)shield)->m_protocol; + switch (m_protocol) { + case SH_HardwareI2C: + BaseI2CDevice::initProtocol ( ); + break; + case SH_SoftwareI2C: + SoftI2cMaster::initProtocol ( ); // no arguments, ie use default h/w i2c pins: (A5,A4) + break; + } + switch (bp) { + case SH_BAS1: + ((EVShield *)shield)->bank_a.writeByte(SH_S1_MODE,SH_Type_I2C); + break; + case SH_BAS2: + ((EVShield *)shield)->bank_a.writeByte(SH_S2_MODE,SH_Type_I2C); + break; + case SH_BBS1: + ((EVShield *)shield)->bank_b.writeByte(SH_S1_MODE,SH_Type_I2C); + break; + case SH_BBS2: + ((EVShield *)shield)->bank_b.writeByte(SH_S2_MODE,SH_Type_I2C); + break; + } +} \ No newline at end of file diff --git a/EVShieldI2C.h b/EVShieldI2C.h new file mode 100644 index 0000000..60ade57 --- /dev/null +++ b/EVShieldI2C.h @@ -0,0 +1,140 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVShieldI2C_H +#define EVShieldI2C_H + +#include "SHDefines.h" +#include "BaseI2CDevice.h" +#include "SoftI2cMaster.h" + +/** + @brief This class implements I2C interfaces used by EVShield. + */ +class EVShieldI2C : public BaseI2CDevice, public SoftI2cMaster +{ +public: + /** Pointer to the EVShield + */ + void * mp_shield; + /** Pointer to internal i2c buffer + */ + uint8_t *_i2c_buffer; + +public: + /** Class constructor for the EVShieldI2C; derived from both BaseI2CDevice and SoftI2cMaster; i2c address must be passed as a parameter */ + EVShieldI2C(uint8_t i2c_address); + + /** global variable of the i2c protocol used */ + uint8_t m_protocol; + + /** initialized this i2c address with a pointer to the EVShield and the bankport it is connected to */ + void init(void * shield, SH_BankPort bp); + + /** Read a byte from specified location + @param location address to read at + @return a byte value read from the location + */ + uint8_t readByte (uint8_t location); + + /** Read an integer from specified location. Integer comprises of 2 bytes. + @param location address to read at + @return an integer value read from the location + */ + uint16_t readInteger (uint8_t location); + + /** Read a long from specified location. Long comprises of 4 bytes. + @param location address to read at + @return a long value read from the location + */ + uint32_t readLong (uint8_t location); + + /** read the specified number of bytes from the buffer starting from the specified start register + @param start_register location to start reading from + @param bytes Number of bytes to read + @param buf buffer to read the data into + @return the character array that was read. + */ + uint8_t* readRegisters (uint8_t start_register, uint8_t bytes, uint8_t* buf); + + /** Read a string from specified location + @param location address to read at + @param bytes_to_read number of bytes to read + @param buffer optional, a buffer to read the data into. + @param buffer_length optional, length of the buffer supplied. + @return a char array read from the location + */ + char* readString (uint8_t location, uint8_t bytes_to_read, + uint8_t* buffer = 0, uint8_t buffer_length = 0); + + /** write data bytes to the i2c device starting from the start register + @param start_register location to write at. + @param bytes_to_write Number of bytes to write + @param buffer (optional) data buffer, if not supplied, data from internal buffer is used. + */ + bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, + uint8_t* buffer = 0); + + /** write one byte to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeByte (uint8_t location, uint8_t data); + + /** write two bytes (int) to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeInteger(uint8_t location, uint16_t data); + + /** write four bytes (long) to the specified register location + @param location location to write to. + @param data the data to write. + */ + bool writeLong (uint8_t location, uint32_t data); + + /** get the firmware version of the device */ + char* getFirmwareVersion(); + + /** get the name of the vendor of the device */ + char* getVendorID(); + + /** get the name of the device */ + char* getDeviceID(); + + /** get the features the device is capable of; only supported by some devices */ + char* getFeatureSet(); + + /** get the error code of last i2c operation */ + uint8_t getErrorCode(); + + bool checkAddress(); + + /** set the i2c address for this device + @param address new device address. + */ + bool setAddress(uint8_t address); + +}; + + +#endif + diff --git a/EVShieldUART.cpp b/EVShieldUART.cpp new file mode 100644 index 0000000..b55f6cc --- /dev/null +++ b/EVShieldUART.cpp @@ -0,0 +1,172 @@ + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Modification history: + Date Author reason + 12/24/14 Deepak Initial development +*/ + +#include "EVShieldUART.h" + +EVShieldUART::EVShieldUART() +{ + mp_shield = NULL; +} + +EVShieldUART::EVShieldUART(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; + + switch(m_bp) { + case SH_BAS1: + case SH_BBS1: + m_offset = 0; + break; + case SH_BAS2: + case SH_BBS2: + m_offset = 52; + break; + } +} + +bool EVShieldUART::setType(uint8_t type) +{ + if ( mp_shield == NULL) return false; + switch (m_bp) { + case SH_BAS1: + return mp_shield->bank_a.sensorSetType(SH_S1, type); + + case SH_BAS2: + return mp_shield->bank_a.sensorSetType(SH_S2, type); + + case SH_BBS1: + return mp_shield->bank_b.sensorSetType(SH_S1, type); + + case SH_BBS2: + return mp_shield->bank_b.sensorSetType(SH_S2, type); + + } +} + +bool EVShieldUART::writeLocation(uint8_t loc, uint8_t data) +{ + if ( mp_shield == NULL) return false; + + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return mp_shield->bank_a.writeByte(loc, data); + + case SH_BBS1: + case SH_BBS2: + return mp_shield->bank_b.writeByte(loc, data); + + } +} + +int16_t EVShieldUART::readLocationInt(uint8_t loc) +{ + if ( mp_shield == NULL) return -1; + + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return mp_shield->bank_a.readInteger(loc); + + case SH_BBS1: + case SH_BBS2: + return mp_shield->bank_b.readInteger(loc); + + } +} + +uint8_t EVShieldUART::readLocationByte(uint8_t loc) +{ + if ( mp_shield == NULL) return -1; + + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return mp_shield->bank_a.readByte(loc); + + case SH_BBS1: + case SH_BBS2: + return mp_shield->bank_b.readByte(loc); + + } +} + +bool EVShieldUART::init(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; + switch(m_bp) { + case SH_BAS1: + case SH_BBS1: + m_offset = 0; + break; + case SH_BAS2: + case SH_BBS2: + m_offset = 52; + break; + } + return true; +} + +uint8_t EVShieldUART::getMode( ) +{ + if ( mp_shield == NULL) return -1; + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return mp_shield->bank_a.readByte(0x81+m_offset); + case SH_BBS1: + case SH_BBS2: + return mp_shield->bank_b.readByte(0x81+m_offset); + } +} + + +uint8_t EVShieldUART::setMode(char newMode) +{ + if ( mp_shield == NULL) return -1; + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return mp_shield->bank_a.writeByte(0x81+m_offset, (uint8_t) newMode); + case SH_BBS1: + case SH_BBS2: + return mp_shield->bank_b.writeByte(0x81+m_offset, (uint8_t) newMode); + } +} + +bool EVShieldUART::readAndPrint(uint8_t loc, uint8_t len) +{ + uint8_t result; + for (int i=loc; i +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach AngleSensor to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_AngleSensor angsens (0x30); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + angsens.init( &evshield, SH_BAS1 ); + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + uint8_t result; + char str2[20]; //sets length of character string 2 + char str3[20]; //sets length of character string 3 + long angle; //declares "angle" variable + long myread; //declares "myread" variable + +/** Displays Firmeware Version of sensor +*/ + strcpy(aa, angsens.getFirmwareVersion() ); + sprintf (str, "angsens: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Displays Device ID of sensor + */ + strcpy(aa, angsens.getDeviceID() ); + sprintf (str, "angsens: DeviceID: %s", aa); + Serial.println(str); +/** Gets and displays Vendor ID of sensor + */ + strcpy(aa, angsens.getVendorID() ); + sprintf (str, "angsens: VendorID: %s", aa); + Serial.println(str); +/** Displays Angle + */ + angle = angsens.getAngle(); + sprintf (str, "angsens: Angle: %ld", angle); + Serial.println(str); +/** Displays Raw Reading + */ + myread = angsens.getRawReading(); + sprintf (str, "angsens: Raw Reading: %ld", myread); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + + diff --git a/EVShield_examples/AngleSensor_examples/AngleSensor_example/AngleSensor/AngleSensor_SerialMonitor_example.txt b/EVShield_examples/AngleSensor_examples/AngleSensor_example/AngleSensor/AngleSensor_SerialMonitor_example.txt new file mode 100644 index 0000000..75dd943 --- /dev/null +++ b/EVShield_examples/AngleSensor_examples/AngleSensor_example/AngleSensor/AngleSensor_SerialMonitor_example.txt @@ -0,0 +1,7 @@ +Press GO button to continue +angsens: getFirmwareVersion: V1.00 +angsens: DeviceID: AngSens +angsens: VendorID: mndsnsrs +angsens: Angle: 6 +angsens: Raw Reading: 13 +------------- \ No newline at end of file diff --git a/EVShield_examples/DistNx/DistNx.ino b/EVShield_examples/DistNx/DistNx.ino new file mode 100644 index 0000000..23e5dbb --- /dev/null +++ b/EVShield_examples/DistNx/DistNx.ino @@ -0,0 +1,111 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach DistNx to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_DISTNx dist (0x02); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + dist.init( &evshield, SH_BAS1 );// Modified for EVShield: 2015-2-16 by Michael Giles + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + int acurr; //declares "acurr" variable + int rcurr; //declares "rcurr" variable + int refI; //declares "refI" variable + +/** Displays Firmeware Version of sensor +*/ + strcpy(aa, dist.getFirmwareVersion() ); + sprintf (str, "DistNx: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Displays Device ID of sensor + */ + strcpy(aa, dist.getDeviceID() ); + sprintf (str, "DistNx: DeviceID: %s", aa); + Serial.println(str); +/** Gets and displays Vendor ID of sensor + */ + strcpy(aa, dist.getVendorID() ); + sprintf (str, "DistNx: VendorID: %s", aa); + Serial.println(str); +/** Displays distance value in mm + */ + acurr = dist.getDist(); + sprintf (str, "DistNx: Distance mm: %d", acurr); + Serial.println(str); +/** Displays Voltage + */ + rcurr = dist.getVolt(); + sprintf (str, "DistNx: Voltage: %d", rcurr); + Serial.println(str); +/** Displays Reference Current value + */ + refI = dist.getType(); + sprintf (str, "DistNx: SensorType: %d", refI); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + + diff --git a/EVShield_examples/LSArray_examples/LSArray_example/LSArray_example.ino b/EVShield_examples/LSArray_examples/LSArray_example/LSArray_example.ino new file mode 100644 index 0000000..cad74c4 --- /dev/null +++ b/EVShield_examples/LSArray_examples/LSArray_example/LSArray_example.ino @@ -0,0 +1,101 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach LightSensorArray to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// +EVs_LightSensorArray lsa (0x14); + +void setup() +{ + char str[256]; + + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to activate the serial monitor + +// Serial.println (__FILE__); +// Serial.println ("Initializing the devices ..."); + // + // Initialize the protocol for EVShield + // It is best to use Hardware I2C (unless you want to use Ultrasonic). + // + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // Initialize the i2c sensors. + // + lsa.init( &evshield, SH_BAS1 ); +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //declare character string length + uint8_t *cal; //declare "cal" pointer + int i; //declare integer "i" + + /** Display Firmware Version */ + strcpy(aa, lsa.getFirmwareVersion() ); + sprintf (str, "LSArray: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Display Device ID */ + strcpy(aa, lsa.getDeviceID() ); + sprintf (str, "LSArray: DeviceID: %s", aa); + Serial.println(str); +/** Display Vendor ID */ + strcpy(aa, lsa.getVendorID() ); + sprintf (str, "LSArray: VendorID: %s", aa); + Serial.println(str); +/** Display 8 different light sensor values */ + cal = lsa.getCalibrated(); + for (i=0; i< 8; i++) + { + sprintf (str, "LSArray: sensor array: %d = %d", i, cal[i] ); + Serial.println(str); + } + + Serial.println( "-------------" ); + delay (1500); +} + + + diff --git a/EVShield_examples/LineLeader_example/LineLeader_example.ino b/EVShield_examples/LineLeader_example/LineLeader_example.ino new file mode 100644 index 0000000..7935ebd --- /dev/null +++ b/EVShield_examples/LineLeader_example/LineLeader_example.ino @@ -0,0 +1,98 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach LineLeader to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// +EVs_LineLeader ll (0x02); + +void setup() +{ + char str[256]; + + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to activate the serial monitor + +// Serial.println (__FILE__); +// Serial.println ("Initializing the devices ..."); + // + // Initialize the protocol for EVShield + // It is best to use Hardware I2C (unless you want to use Ultrasonic). + // + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // Initialize the i2c sensors. + // + ll.init( &evshield, SH_BAS1 ); + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; + uint8_t result; + char str2[20]; + + strcpy(aa, ll.getFirmwareVersion() ); + sprintf (str, "ll: getFirmwareVersion: %s", aa); + Serial.println(str); + + strcpy(aa, ll.getDeviceID() ); + sprintf (str, "ll: DeviceID: %s", aa); + Serial.println(str); + + strcpy(aa, ll.getVendorID() ); + sprintf (str, "ll: VendorID: %s", aa); + Serial.println(str); + + result = ll.getResult(); + format_bin(result, str2); + sprintf (str, "ll: sensor array: %s", str2 ); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + + diff --git a/EVShield_examples/NXTCam_blobs/NXTCam_blobs.ino b/EVShield_examples/NXTCam_blobs/NXTCam_blobs.ino new file mode 100644 index 0000000..d3a75dd --- /dev/null +++ b/EVShield_examples/NXTCam_blobs/NXTCam_blobs.ino @@ -0,0 +1,130 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); +int nblobs; +uint8_t color[8]; +uint8_t left[8]; +uint8_t top[8]; +uint8_t bottom[8]; +uint8_t right[8]; + +// +// declare the i2c devices used on EVShield(s). +// +EVs_NXTCam myCam; // connect NXTCam to BAS1 + +void setup() +{ + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to activate the serial monitor + + //Serial.println (__FILE__); + Serial.println ("Initializing the devices ..."); + // + // Initialize the protocol for EVShield + // It is best to use Hardware I2C (unless you want to use Ultrasonic). + // + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // Initialize the i2c sensors. + // + myCam.init( &evshield, SH_BAS1 ); + + // if there was previous run of this program, + // the tracking might still be on, so disable it. + myCam.disableTracking(); + + // setup myCam for Object mode and sort by size. + // also let it begin tracking. + myCam.selectObjectMode(); + myCam.sortSize(); + myCam.enableTracking(); + delay(1000); + + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; + uint8_t result; + char str2[20]; + + strcpy(aa, myCam.getFirmwareVersion() ); + sprintf (str, "myCam: getFirmwareVersion: %s", aa); + Serial.println(str); + + strcpy(aa, myCam.getDeviceID() ); + sprintf (str, "myCam: DeviceID: %s", aa); + Serial.println(str); + + strcpy(aa, myCam.getVendorID() ); + sprintf (str, "myCam: VendorID: %s", aa); + Serial.println(str); + + Serial.println( "-------------" ); + + myCam.issueCommand('J'); // lock buffer + delay(500); + myCam.getBlobs(&nblobs, color, left, top, right, bottom); + delay(500); + myCam.issueCommand('K'); // unlock buffer + Serial.println(nblobs); + for (int i = 0; i < nblobs; i++) { + sprintf(str, "color[%d]: %d ", (i + 1), color[i]); + Serial.print(str); + str[0] = '\0'; + sprintf(str, "left[%d]: %d ", (i + 1), left[i]); + Serial.print(str); + str[0] = '\0'; + sprintf(str, "top[%d]: %d ", (i + 1), top[i]); + Serial.print(str); + str[0] = '\0'; + sprintf(str, "right[%d]: %d ", (i + 1), right[i]); + Serial.print(str); + str[0] = '\0'; + sprintf(str, "bottom[%d]: %d ", (i + 1), bottom[i]); + Serial.println(str); + str[0] = '\0'; + } + Serial.println( "-------------" ); + +} + + diff --git a/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeter/NXTCurrentMeter.ino b/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeter/NXTCurrentMeter.ino new file mode 100644 index 0000000..73d73bf --- /dev/null +++ b/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeter/NXTCurrentMeter.ino @@ -0,0 +1,111 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach NXTVoltMeter to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_CurrentMeter im (0x28); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + im.init( &evshield, SH_BAS1 );// Modified for EVShield: 2015-2-16 by Michael Giles + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + int acurr; //declares "acurr" variable + int rcurr; //declares "rcurr" variable + int refI; //declares "refI" variable + +/** Displays Firmeware Version of sensor +*/ + strcpy(aa, im.getFirmwareVersion() ); + sprintf (str, "IMeter: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Displays Device ID of sensor + */ + strcpy(aa, im.getDeviceID() ); + sprintf (str, "IMeter: DeviceID: %s", aa); + Serial.println(str); +/** Gets and displays Vendor ID of sensor + */ + strcpy(aa, im.getVendorID() ); + sprintf (str, "IMeter: VendorID: %s", aa); + Serial.println(str); +/** Displays Absolute Current value + */ + acurr = im.getACurrent(); + sprintf (str, "IMeter: Absolute Current: %d", acurr); + Serial.println(str); +/** Displays Relative Current value + */ + rcurr = im.getRCurrent(); + sprintf (str, "IMeter: Relative Current: %d", rcurr); + Serial.println(str); +/** Displays Reference Current value + */ + refI = im.getReference(); + sprintf (str, "IMeter: Reference Current: %d", refI); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + + diff --git a/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeterRefSet/NXTCurrentMeterRefSet.ino b/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeterRefSet/NXTCurrentMeterRefSet.ino new file mode 100644 index 0000000..4bb44b4 --- /dev/null +++ b/EVShield_examples/NXTCurrentMeter_examples/NXTCurrentMeterRefSet/NXTCurrentMeterRefSet.ino @@ -0,0 +1,80 @@ +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach NXTVoltMeter to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_CurrentMeter im (0x28); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + im.init( &evshield, SH_BAS1 ); +/** Sets the Reference Current to Absolute Current + */ + im.setReferenceI(); + +} + + +#define DELAY_T 0 + +void loop() +{ + char str[256]; //declares character string length + int acurr; //declares "acurr" variable + int rcurr; //declares "rcurr" variable + int refI; //declares "refI" variable + +/** Displays Absolute Current value + */ + acurr = im.getACurrent(); + sprintf (str, "IMeter: Absolute Current: %d", acurr); + Serial.println(str); +/** Displays Relative Current value + */ + rcurr = im.getRCurrent(); + sprintf (str, "IMeter: Relative Current: %d", rcurr); + Serial.println(str); +/** Displays Reference Current value + */ + refI = im.getReference(); + sprintf (str, "IMeter: Reference Current: %d", refI); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); + + +} + diff --git a/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeter/NXTVoltMeter.ino b/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeter/NXTVoltMeter.ino new file mode 100644 index 0000000..da90dec --- /dev/null +++ b/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeter/NXTVoltMeter.ino @@ -0,0 +1,111 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach NXTVoltMeter to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_VoltMeter vm (0x26); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + vm.init( &evshield, SH_BAS1 ); + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + int avolt; //declares "avolt" variable + int rvolt; //declares "rvolt" variable + int refV; //declares "refV" variable + +/** Displays Firmeware Version of sensor +*/ + strcpy(aa, vm.getFirmwareVersion() ); + sprintf (str, "VMeter: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Displays Device ID of sensor + */ + strcpy(aa, vm.getDeviceID() ); + sprintf (str, "VMeter: DeviceID: %s", aa); + Serial.println(str); +/** Gets and displays Vendor ID of sensor + */ + strcpy(aa, vm.getVendorID() ); + sprintf (str, "VMeter: VendorID: %s", aa); + Serial.println(str); +/** Displays Absolute Voltage value + */ + avolt = vm.getAVoltage(); + sprintf (str, "VMeter: Absolute Volts: %d", avolt); + Serial.println(str); +/** Displays Relative Voltage value + */ + rvolt = vm.getRVoltage(); + sprintf (str, "VMeter: Relative Volts: %d", rvolt); + Serial.println(str); +/** Displays Reference Voltage value + */ + refV = vm.getReference(); + sprintf (str, "VMeter: Reference Voltage: %d", refV); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + + diff --git a/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeterRefSet/NXTVoltMeterRefSet.ino b/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeterRefSet/NXTVoltMeterRefSet.ino new file mode 100644 index 0000000..0285a2a --- /dev/null +++ b/EVShield_examples/NXTVoltMeter_examples/NXTVoltMeterRefSet/NXTVoltMeterRefSet.ino @@ -0,0 +1,80 @@ +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach NXTVoltMeter to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_VoltMeter vm (0x26); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + vm.init( &evshield, SH_BAS1 ); +/** Set the Reference Voltage to Absolute Voltage. + */ + vm.setReferenceV(); + +} + + +#define DELAY_T 0 + +void loop() +{ + char str[256]; //declares character string length + int avolt; //declares "avolt" variable + int rvolt; //declares "rvolt" variable + int refV; //declares "refV" variable + +/** Displays Absolute Voltage value + */ + avolt = vm.getAVoltage(); + sprintf (str, "VMeter: Absolute Volts: %d", avolt); + Serial.println(str); +/** Displays Relative Voltage value + */ + rvolt = vm.getRVoltage(); + sprintf (str, "VMeter: Relative Volts: %d", rvolt); + Serial.println(str); +/** Displays Reference Voltage value + */ + refV = vm.getReference(); + sprintf (str, "VMeter: Reference Volts: %d", refV); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); + + +} + diff --git a/EVShield_examples/NumericPad/NumericPad.ino b/EVShield_examples/NumericPad/NumericPad.ino new file mode 100644 index 0000000..55d75eb --- /dev/null +++ b/EVShield_examples/NumericPad/NumericPad.ino @@ -0,0 +1,85 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach NumericPad to Port BAS1 +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_NumericPad np (0xB4); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + np.init( &evshield, SH_BAS1 );// Modified for EVShield: 2015-2-16 by Michael Giles + np.InitializeKeyPad(); +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + int keys; //declares "keys" variable + + +/** Displays Key(s) pressed + */ + keys = np.GetKeysPressed(); + sprintf (str, "Keys Pressed: %d", keys); + Serial.println(str); + + Serial.println( "-------------" ); + delay (1500); +} + +' ' diff --git a/EVShield_examples/PiLight_demo/PiLight_demo.ino b/EVShield_examples/PiLight_demo/PiLight_demo.ino new file mode 100644 index 0000000..0378aad --- /dev/null +++ b/EVShield_examples/PiLight_demo/PiLight_demo.ino @@ -0,0 +1,115 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach PiLight to I2C Pins +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield; + +// +// declare the i2c devices used on EVShield(s). +// + +EVs_PiLight pilyt (0x30); + +void setup() +{ + char str[256]; +/** Start serial for output + */ + Serial.begin(115200); // +/** Wait, allowing time to activate the serial monitor + */ + delay(500); // wait, allowing time to activate the serial monitor + + +/** Initialize the protocol for EVShield + It is best to use Hardware I2C (unless you want to use Ultrasonic). + */ + evshield.init( SH_HardwareI2C ); +/** Wait until user presses GO button to continue the program + */ + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); +/** Initialize the i2c sensors. + */ + pilyt.init( &evshield, SH_BAS1 ); +/** Set timeout to save power +*/ + pilyt.setTimeout1(7); + +} + +#define DELAY_T 0 + +void loop() +{ + char aa[80]; + char str[256]; //sets length of character string + color mycolor; //declares color variable +/** Displays Firmeware Version of sensor +*/ + strcpy(aa, pilyt.getFirmwareVersion() ); + sprintf (str, "pilight: getFirmwareVersion: %s", aa); + Serial.println(str); +/** Displays Device ID of sensor + */ + strcpy(aa, pilyt.getDeviceID() ); + sprintf (str, "pilight: DeviceID: %s", aa); + Serial.println(str); +/** Gets and displays Vendor ID of sensor + */ + strcpy(aa, pilyt.getVendorID() ); + sprintf (str, "pilight: VendorID: %s", aa); + Serial.println(str); + delay(1000); +/** Sets and Displays the color values + */ + pilyt.createPiLight(25,0,0); //red + pilyt.readPiLight(mycolor); + sprintf (str, "pilight: color r:%d | g:%d | b:%d", mycolor.r, mycolor.g, mycolor.b); + Serial.println(str); + delay(1000); + + pilyt.createPiLight(0,25,0); //green + pilyt.readPiLight(mycolor); + sprintf (str, "pilight: color r:%d | g:%d | b:%d", mycolor.r, mycolor.g, mycolor.b); + Serial.println(str); + delay(1000); + + pilyt.createPiLight(0,0,25); //blue + pilyt.readPiLight(mycolor); + sprintf (str, "pilight: color r:%d | g:%d | b:%d", mycolor.r, mycolor.g, mycolor.b); + Serial.println(str); + Serial.println( "-------------" ); + delay(1000); + +} + + diff --git a/EVShield_examples/bump_count/bump_count.ino b/EVShield_examples/bump_count/bump_count.ino new file mode 100644 index 0000000..fac50b4 --- /dev/null +++ b/EVShield_examples/bump_count/bump_count.ino @@ -0,0 +1,93 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +//#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach NXT Touch Sensor to Port BAS1 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_EV3Touch touch1; + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + Serial.println ("Starting EV3 Touch Sensor Test program"); + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the touch sensor, and tell where it is connected. + // + touch1.init( &evshield, SH_BAS2); + + + Serial.println("setup done"); + Serial.println("Press Touch Sensor to see results"); + +} + +int bumpCount, oldBumpCount; +void +loop() +{ + char str[80]; + + + // + // wait for some time + // + Serial.println("Sleeping for 5 seconds... (in the meantime, press touch sensor couple of times)"); + delay(5000); + bumpCount = touch1.getBumpCount(); + sprintf(str, "BumpCount: old: %d, new: %d", oldBumpCount, bumpCount); + Serial.println(str); + oldBumpCount = bumpCount; +} + diff --git a/EVShield_examples/ev3_gyro/ev3_gyro.ino b/EVShield_examples/ev3_gyro/ev3_gyro.ino new file mode 100644 index 0000000..e340a70 --- /dev/null +++ b/EVShield_examples/ev3_gyro/ev3_gyro.ino @@ -0,0 +1,100 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* + * For beginners tutorial (and user guide) visit: + * http://www.openelectrons.com/docs/viewdoc/25 + */ + +#include +#include +#include +#include + +// setup for this example: +// attach external power to evshield. +// attach EV3 Gyro Sensor to Port BBS1 +// Open the Serial terminal to view results. + +EVShield evshield(0x34,0x36); // Create shield object +EVs_EV3Gyro myGyro; // Create our sensor for use in this program + +void setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + Serial.println ("--------------------------------------"); + Serial.println ("Starting EV3 Gyro Sensor Test program"); + Serial.println ("--------------------------------------"); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the sensor, and tell where it is connected. + // + myGyro.init( &evshield, SH_BBS1 ); + //us1.setMode(MODE_Sonar_Inches); + //myGyro.setMode(MODE_Gyro_Rate); + myGyro.setMode(MODE_Gyro_Angle); + + + Serial.println("setup done"); + Serial.println("turn your gyro to see change in value"); + +} + +char last_data[200]; +char curr_data[200]; +char output[500]; + +void +loop() +{ + uint8_t mode; + int angle; + char str[50]; + int i; + + //myGyro.readAndPrint(0x81+myGyro.m_offset, 10); + // + // get the reading from sensor + // + angle = myGyro.getAngle(); + + // + // print the sensor staus + // + Serial.print("angle: "); Serial.println(angle); + + + // + // wait for some time + // + delay(1000); +} + diff --git a/EVShield_examples/ev3_infrared/ev3_infrared.ino b/EVShield_examples/ev3_infrared/ev3_infrared.ino new file mode 100644 index 0000000..a97914b --- /dev/null +++ b/EVShield_examples/ev3_infrared/ev3_infrared.ino @@ -0,0 +1,109 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach EV3 Ultrasonic Sensor to Port BAS2 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_EV3Infrared infra01; + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + Serial.println ("--------------------------------------"); + Serial.println ("Starting EV3 Ultrasonic Sensor Test program"); + Serial.println ("--------------------------------------"); + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the sensor, and tell where it is connected. + // + infra01.init( &evshield, SH_BAS2 ); + infra01.setMode(MODE_Infrared_Proximity); + //infra01.setMode(MODE_Infrared_Beacon); + + + Serial.println("setup done"); + Serial.println("Hold object in front of Sensor to see results"); + +} + +char last_data[200]; +char curr_data[200]; +char output[500]; + +void +loop() +{ + uint8_t mode; + float distance; + char str[50]; + int i; + + infra01.readAndPrint(0x81+infra01.m_offset, 10); + // + // get reading from the sensor + // + Serial.print("proximity value: "); Serial.print(infra01.readProximity()); + Serial.println (""); + + // + // print the sensor staus + // + + + // + // wait for some time + // + delay(500); +} + diff --git a/EVShield_examples/ev3_touch/ev3_touch.ino b/EVShield_examples/ev3_touch/ev3_touch.ino new file mode 100644 index 0000000..886911d --- /dev/null +++ b/EVShield_examples/ev3_touch/ev3_touch.ino @@ -0,0 +1,135 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +//#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach NXT Touch Sensor to Port BAS1 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_EV3Touch touch1; + +void +setup() +{ + char str[50]; + long timeBefore, timeAfter; + + Serial.begin(115200); // start serial for output + + Serial.println ("--------------------------------------"); + Serial.println ("Starting EV3 Touch Sensor Test program"); + Serial.println ("--------------------------------------"); + + // + // initialize the shield i2c interface. + // + timeBefore = millis(); + evshield.init( SH_HardwareI2C ); + timeAfter = millis(); + sprintf (str, "after evshield.init(): %ld, %ld", timeAfter - timeBefore, timeAfter); + Serial.println(str); + + // + // red on bank a and + // blue on bank b + // + Serial.println("before led on"); + timeBefore = millis(); + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + timeAfter = millis(); + sprintf(str, "after led on, %ld, %ld", timeAfter - timeBefore, timeAfter); + Serial.println( str ); + + // + // initialize the sensor, and tell where it is connected. + // + Serial.println("before touch1.init"); + timeBefore = millis(); + touch1.init( &evshield, SH_BAS1); + timeAfter = millis(); + sprintf(str, "after touch1.init: %ld, %ld", timeAfter - timeBefore, timeAfter); + Serial.println(str); + + + Serial.println("setup done"); + Serial.println("Press Touch Sensor to see results"); + +} + +void +loop() +{ + bool bTouchVal; + char str[50]; + + + // + // see if the sensor is pressed. + // + bTouchVal = touch1.isPressed(); + + // + // print the sensor staus + // + /* + sprintf (str, "TouchSensor Status: %s", bTouchVal?"Pressed":"not-pressed"); + Serial.println(str); + sprintf (str, "TouchSensor Bump Count: %d", touch1.getBumpCount()); + Serial.println(str); + Serial.println("Press LEFT button to reset bump count"); + */ + if ( bTouchVal ) { + // + // power on the leds in Red color + // + evshield.ledSetRGB(10,0,0); + } else { + // + // turn off the leds + // + evshield.ledSetRGB(0,0,0); + } + if ( evshield.getButtonState(BTN_LEFT) == true ) { + Serial.println("resetting bump count"); + touch1.resetBumpCount(); + } + // + // wait for one second + // + delay(1000); +} + diff --git a/EVShield_examples/ev3_ultrasonic/ev3_ultrasonic.ino b/EVShield_examples/ev3_ultrasonic/ev3_ultrasonic.ino new file mode 100644 index 0000000..5cae389 --- /dev/null +++ b/EVShield_examples/ev3_ultrasonic/ev3_ultrasonic.ino @@ -0,0 +1,121 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach EV3 Ultrasonic Sensor to Port BAS2 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_EV3Ultrasonic us1; + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + Serial.println ("--------------------------------------"); + Serial.println ("Starting EV3 Ultrasonic Sensor Test program"); + Serial.println ("--------------------------------------"); + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the sensor, and tell where it is connected. + // + us1.init( &evshield, SH_BAS2 ); + //us1.setMode(MODE_Sonar_Inches); + us1.setMode(MODE_Sonar_CM); + + + Serial.println("setup done"); + Serial.println("Hold object in front of Sensor to see results"); + +} + +char last_data[200]; +char curr_data[200]; +char output[500]; + +void +loop() +{ + uint8_t mode; + float distance; + char str[50]; + int i; + + // + // get the reading from sensor + // + distance = us1.getDist(); + mode = us1.getMode(); + + // + // print the sensor staus + // + char *s; + switch (mode) { + case MODE_Sonar_Inches: + s = "Inches"; + break; + case MODE_Sonar_CM: + s = "cm"; + break; + } + Serial.print("Distance to obstacle: "); Serial.print(distance); + Serial.print (" ("); + Serial.print (s); + Serial.println (")"); + + + // + // wait for some time + // + delay(1000); +} + diff --git a/EVShield_examples/motor_and_touch/motor_and_touch.ino b/EVShield_examples/motor_and_touch/motor_and_touch.ino new file mode 100644 index 0000000..13ccea5 --- /dev/null +++ b/EVShield_examples/motor_and_touch/motor_and_touch.ino @@ -0,0 +1,135 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + + +#include +#include +#include + + +// setup for this example: +// attach external power to EVShield. +// attach a touch sensor to BBS1 +// attach motors to motor ports (any number of motors is fine). +// Open the Serial terminal to view. + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +// +// declare analog devices attached to evshields. +// +EVs_NXTTouch touch1; + +void setup() +{ + char str[256]; + + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to activate the serial monitor + + Serial.println ("Initializing the devices ..."); + // + // EVShield provides multiple protocols + // Initialize the protocol for EVShield + // It is best to use Hardware I2C (unless you want to use Ultrasonic). + // + evshield.init( SH_SoftwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // Initialize the i2c sensors. + // + + // initialize the analog sensors. + touch1.init( &evshield, SH_BBS1 ); + + // + // reset motors. + // + evshield.bank_a.motorReset(); + evshield.bank_b.motorReset(); + + Serial.println("\nEnter a character and press 'Send' to begin"); + // + // wait until user enters a key on serial window. + // + while (Serial.available() <= 0) { + delay(1000); + } + +} + + +void loop() +{ + char aa[80]; + int a; + char str[256]; + bool touch_status; + bool last_status; + + while (true) { + + // + // run the motor if touch sensor is pressed. + // + + + a = touch1.readRaw(); + + + touch_status = touch1.isPressed(); + sprintf (str, "touch1: is pressed : %s", touch_status?"true":"false"); + Serial.println(str); + //if ( 1 ) { + if ( touch_status != last_status ) { + if ( touch_status ) { + Serial.println( "run unlimited" ); + evshield.bank_b.motorRunUnlimited(SH_Motor_1, SH_Direction_Forward, 50); + evshield.bank_b.motorRunUnlimited(SH_Motor_2, SH_Direction_Forward, 50); + evshield.bank_a.motorRunUnlimited(SH_Motor_1, SH_Direction_Forward, 50); + evshield.bank_a.motorRunUnlimited(SH_Motor_2, SH_Direction_Forward, 50); + } else { + Serial.println( "stop (float)"); + evshield.bank_b.motorStop(SH_Motor_1, SH_Next_Action_Float); + evshield.bank_b.motorStop(SH_Motor_2, SH_Next_Action_Float); + evshield.bank_a.motorStop(SH_Motor_1, SH_Next_Action_Float); + evshield.bank_a.motorStop(SH_Motor_2, SH_Next_Action_Float); + } + last_status = touch_status; + } + + delay (500); + } +} + + diff --git a/EVShield_examples/motor_rotations/motor_rotations.ino b/EVShield_examples/motor_rotations/motor_rotations.ino new file mode 100644 index 0000000..55ff211 --- /dev/null +++ b/EVShield_examples/motor_rotations/motor_rotations.ino @@ -0,0 +1,212 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include + +// setup for this example: +// attach external power to EVShield. +// attach 4 motors to motor ports +// Open the Serial terminal to view. + +EVShield evshield(0x34,0x36); + +void +setup() +{ + Serial.begin(115200); // start serial for output + delay(2000); // wait two seconds, allowing time to + // activate the serial monitor + + long rotations = 2; // Define variable rotations and set + // equal to 90 + char str[40]; + + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // reset motors. + // + evshield.bank_a.motorReset(); + evshield.bank_b.motorReset(); + + + // Drive motor 1 forward and backward for a specific number of + // rotations + delay(1000); + Serial.println("Bank A motors >>"); + sprintf(str, "Motor 1 Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_1, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Motor 1 Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_1, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + // Drive motor 2 forward and backward for a specific number of + // rotations + delay(1000); + sprintf(str, "Motor 2 Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_2, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Motor 2 Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_2, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + // Drive both motors forward and backward for a specific number of + // rotations + delay(1000); + sprintf(str, "Both Motors Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_Both, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Both Motors Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_a.motorRunRotations(SH_Motor_Both, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + Serial.println("Bank B motors >>"); + // Drive motor 1 forward and backward for a specific number of + // rotations + delay(1000); + sprintf(str, "Motor 1 Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_1, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Motor 1 Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_1, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + // Drive motor 2 forward and backward for a specific number of + // rotations + delay(1000); + sprintf(str, "Motor 2 Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_2, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Motor 2 Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_2, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + // Drive both motors forward and backward for a specific number of + // rotations + delay(1000); + sprintf(str, "Both Motors Forward %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_Both, + SH_Direction_Forward, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + delay(1000); + sprintf(str, "Both Motors Reverse %d Rotations", rotations); + Serial.println(str); + str[0] = '\0'; + evshield.bank_b.motorRunRotations(SH_Motor_Both, + SH_Direction_Reverse, + SH_Speed_Medium, + rotations, + SH_Completion_Wait_For, + SH_Next_Action_BrakeHold); + + Serial.println("Program Finished"); + +} + +void +loop() // After the setup the LED blinks to show + // the program is complete +{ + evshield.ledSetRGB(8,0,0); // light on the EVShield LED + delay(1000); // wait + evshield.ledSetRGB(0,0,0); // turn off the EVShield LED. + delay(1000); // wait +} + diff --git a/EVShield_examples/multi_color_led/multi_color_led.ino b/EVShield_examples/multi_color_led/multi_color_led.ino new file mode 100644 index 0000000..1dfab4c --- /dev/null +++ b/EVShield_examples/multi_color_led/multi_color_led.ino @@ -0,0 +1,78 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#define GLOBAL_DELAY 50 + +/** + This is a simple example of blinking + the EVShield LED with multiple colors. +*/ +EVShield evshield(0x34,0x36); + +void setup() +{ + Serial.begin(115200); + + evshield.init(SH_HardwareI2C); + + Serial.println ("Watch the LED on EVShield ..."); +} + +void loop() +{ + multi_color_blink(); +} + +void multi_color_blink(){ + for (int i=8; i>=0; i--){ + if (i<=4) evshield.ledSetRGB(i,4-i,0); + else evshield.ledSetRGB(i,0,0); + delay(GLOBAL_DELAY); + } + + for (int i=5; i<=8; i++){ + evshield.ledSetRGB(0,i,0); + delay(GLOBAL_DELAY/2); + } + + for (int i=8; i>=0; i--){ + if (i<=4) evshield.ledSetRGB(0,i,4-i); + else evshield.ledSetRGB(0,i,0); + delay(GLOBAL_DELAY); + } + + for (int i=5; i<=8; i++){ + evshield.ledSetRGB(0,0,i); + delay(GLOBAL_DELAY/2); + } + + for (int i=8; i>=0; i--){ + if (i<=4) evshield.ledSetRGB(4-i,0,i); + else evshield.ledSetRGB(0,0,i); + delay(GLOBAL_DELAY); + } + + for (int i=5; i<=8; i++){ + evshield.ledSetRGB(i,0,0); + delay(GLOBAL_DELAY/2); + } +} diff --git a/EVShield_examples/nxt_color/nxt_color.ino b/EVShield_examples/nxt_color/nxt_color.ino new file mode 100644 index 0000000..7fc210a --- /dev/null +++ b/EVShield_examples/nxt_color/nxt_color.ino @@ -0,0 +1,98 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach NXT Color Sensor to Port BAS1 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_NXTColor c1; + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + Serial.println ("Starting NXT Color Sensor Test program"); + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the sensor, and tell where it is connected. + // + c1.init( &evshield, SH_BAS1); + //c1.setType(SH_Type_COLORNONE); + + + Serial.println("setup done"); + Serial.println("hold a colored object in front of the color sensor"); + +} + +void +loop() +{ + int val; + char str[50]; + + + // + // read the value from color sensor + // + val = c1.readValue(); + + // + // print the value on serial terminal + // + Serial.print("color sensor value: "); Serial.println(val); + + // + // wait for one second + // + delay(1000); +} + diff --git a/EVShield_examples/nxt_light/nxt_light.ino b/EVShield_examples/nxt_light/nxt_light.ino new file mode 100644 index 0000000..3ec907c --- /dev/null +++ b/EVShield_examples/nxt_light/nxt_light.ino @@ -0,0 +1,106 @@ +/************************************************************************/ +/* + Copyright (c) 2015 by mindsensors.com + Email: info () mindsensors () com + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +/* To see this program working, + * Connect a Touch sensor to BAS1 + * Connect a Light sensor to BAS2 + * Download this program on your Arduino. + * Start the Serial Monitor in Arduino-IDE + * Set baud rate to 115200 for your serial connection + * Follow instructions in serial window. + */ + +#include +#include +#include +#include + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield; + +// +// declare analog devices attached to EVShield. +// +EVs_NXTTouch touch1; +EVs_NXTLight light1; + +void setup() +{ + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to + // activate the serial monitor + Serial.println ("Initializing the devices ..."); + // + // Initialize the protocol + // It is best to use Hardware I2C + // + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // initialize the analog sensors. + // NXT light sensor is not supported on BAS1. + // connect a NXT light sensor to BAS2, + // connect a touch sensor to BAS1 + // + touch1.init( &evshield, SH_BAS1 ); + light1.init( &evshield, SH_BAS2 ); +} + +bool lastTouch, touchPressed; +void loop() +{ + char str[256]; + int lightReading; + + Serial.println("------------------------------------"); + + touchPressed = touch1.isPressed(); + sprintf (str, "touch1: is pressed : %s", touchPressed?"true":"false"); + Serial.println(str); + + if ( touchPressed != lastTouch ) { + if ( touchPressed == true ) { + Serial.println( "Changing light sensor to reflected light mode" ); + light1.setReflected(); + } else { + Serial.println( "Changing light sensor to ambient light mode" ); + light1.setAmbient(); + } + lastTouch = touchPressed; + } + lightReading = light1.readRaw(); + sprintf (str, "Light sensor Reading: %d", lightReading); + Serial.println (str); + + delay (1000); +} diff --git a/EVShield_examples/nxt_touch/nxt_touch.ino b/EVShield_examples/nxt_touch/nxt_touch.ino new file mode 100644 index 0000000..fd7bb54 --- /dev/null +++ b/EVShield_examples/nxt_touch/nxt_touch.ino @@ -0,0 +1,109 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach NXT Touch Sensor to Port BAS1 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +// +// Declare our sensor for use in this program +// +EVs_NXTTouch touch1; + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + Serial.println ("Starting NXT Touch Sensor Test program"); + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(5,0,0); + evshield.bank_b.ledSetRGB(0,0,5); + + // + // initialize the touch sensor, and tell where it is connected. + // + touch1.init( &evshield, SH_BAS1); + + + Serial.println("setup done"); + Serial.println("Press Touch Sensor to see results"); + +} + +void +loop() +{ + bool bTouchVal; + char str[50]; + + + // + // see if the sensor is pressed. + // + bTouchVal = touch1.isPressed(); + + // + // print the sensor staus + // + sprintf (str, "TouchSensor Status: %s", bTouchVal?"Pressed":"not-pressed"); + Serial.println(str); + if ( bTouchVal ) { + // + // power on the leds in Red color + // + evshield.ledSetRGB(10,0,0); + } else { + // + // turn off the leds + // + evshield.ledSetRGB(0,0,0); + } + // + // wait for one second + // + delay(1000); +} + diff --git a/EVShield_examples/print_bank_info/print_bank_info.ino b/EVShield_examples/print_bank_info/print_bank_info.ino new file mode 100644 index 0000000..faa57af --- /dev/null +++ b/EVShield_examples/print_bank_info/print_bank_info.ino @@ -0,0 +1,126 @@ +/************************************************************************/ +/* + Copyright (c) 2015 by mindsensors.com + Email: info () mindsensors () com + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include + + +EVShield evshield; + +int inByte = 0; + +void setup() +{ + char str[80]; + + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to + // activate the serial monitor + + // + // EVShield supports multiple transports + // Initialize the transport for i2c devices. + // + evshield.init(SH_HardwareI2C); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press LEFT button to continue"); + evshield.waitForButtonPress(BTN_LEFT); + +} + +void +loop() +{ + int ba_v1, ba_v2, bb_v1, bb_v2, bb_us; + char str[256]; + int accl_x; + bool touchPressed; + bool status; + + while (true) { + + if (Serial.available() > 0) { + // + // get user input from serial window + // + inByte = Serial.read(); + sprintf (str, "input: %c", inByte); + Serial.println(str); + + switch (inByte) { + case '1': + // turn on RED LED + evshield.ledSetRGB(8, 0, 0); + break; + case '2': + // turn on Green LED + evshield.ledSetRGB(0, 8, 0); + break; + case '3': + // turn on blue LED + evshield.ledSetRGB(0, 0, 8); + break; + + default: + sprintf (str, "this key not implemented"); + Serial.println(str); + break; + } + } else { + strcpy (str, "BA ... "); + strcat (str, "F/w Version: "); + strcat (str, evshield.bank_a.getFirmwareVersion()); + strcat (str, ", Vendor ID: "); + strcat (str, evshield.bank_a.getVendorID()); + strcat (str, ", Device ID: "); + strcat (str, evshield.bank_a.getDeviceID()); + strcat (str, ", Feature Set: "); + strcat (str, evshield.bank_a.getFeatureSet()); + Serial.println(str); + + delay (100); + strcpy (str, "BB ... "); + strcat (str, "F/w Version: "); + strcat (str, evshield.bank_b.getFirmwareVersion()); + strcat (str, ", Vendor ID: "); + strcat (str, evshield.bank_b.getVendorID()); + strcat (str, ", Device ID: "); + strcat (str, evshield.bank_b.getDeviceID()); + strcat (str, ", Feature Set: "); + strcat (str, evshield.bank_b.getFeatureSet()); + Serial.println(str); + + int voltage; + voltage = evshield.bank_a.evshieldGetBatteryVoltage(); + Serial.print ("Voltage (milli-volts): "); + Serial.println ( voltage ); + + } + delay (1000); + } +} diff --git a/EVShield_examples/rc_servo_with_buttons/rc_servo_with_buttons.ino b/EVShield_examples/rc_servo_with_buttons/rc_servo_with_buttons.ino new file mode 100644 index 0000000..e44cfd3 --- /dev/null +++ b/EVShield_examples/rc_servo_with_buttons/rc_servo_with_buttons.ino @@ -0,0 +1,69 @@ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + +/* + History + ---------------------------------- + Author Date Comments + Uday Patil 08/02/2012 Wrote the program and tested. + Michael Giles 01/20/2015 Modified program to work with EVShield + +*/ + +// setup for this example: +// attach external power to EVShield. +// attach RC servo to Pins 3 (pins are near Bank B-M1) +// use left and right buttons to move servo motor. + +Servo myservo; +EVShield Ev(0x34,0x36); + +int pos = 0; + +void setup() { + Serial.begin(115200); + + Ev.init(SH_SoftwareI2C); + myservo.attach(3); + +} + +void loop() +{ + boolean left_btn = Ev.getButtonState(BTN_LEFT); + boolean right_btn = Ev.getButtonState(BTN_RIGHT); + while (right_btn == true){ + right_btn = Ev.getButtonState(BTN_RIGHT); + pos +=1; + myservo.write(pos); + delay(10); + } + while (left_btn == true){ + left_btn = Ev.getButtonState(BTN_LEFT); + pos -=1; + myservo.write(pos); + delay(10); + } +} + diff --git a/EVShield_examples/shield_buttons/shield_buttons.ino b/EVShield_examples/shield_buttons/shield_buttons.ino new file mode 100644 index 0000000..4537798 --- /dev/null +++ b/EVShield_examples/shield_buttons/shield_buttons.ino @@ -0,0 +1,90 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + + +// setup for this example: +// attach external power to evshield. +// attach NXT Touch Sensor to Port BAS1 +// Open the Serial terminal to view. + +// +// Declare shield variable for this program +// +EVShield evshield(0x34,0x36); + +void +setup() +{ + char str[50]; + + Serial.begin(115200); // start serial for output + + // + // initialize the shield i2c interface. + // + evshield.init( SH_HardwareI2C ); + + // + // red on bank a and + // blue on bank b + // + evshield.bank_a.ledSetRGB(100,0,0); + evshield.bank_b.ledSetRGB(0,0,100); + + + Serial.println("setup done"); + Serial.println("Press Shield buttons to see results"); +} + +void +loop() +{ + char str[50]; + + + // + // see if left button is pressed. + // + if ( evshield.getButtonState(BTN_LEFT) == true ) { + Serial.println("LEFT button pressed"); + evshield.ledSetRGB(100,0,0); + evshield.ledSetRGB(100,0,0); + } + // + // see if right button is pressed. + // + if ( evshield.getButtonState(BTN_RIGHT) == true ) { + Serial.println("RIGHT button pressed"); + evshield.ledSetRGB(0,100,0); + evshield.ledSetRGB(0,100,0); + } + + // + // wait for one second + // + delay(1000); +} + diff --git a/EVShield_examples/sumo_eyes/sumo_eyes.ino b/EVShield_examples/sumo_eyes/sumo_eyes.ino new file mode 100644 index 0000000..d1fec62 --- /dev/null +++ b/EVShield_examples/sumo_eyes/sumo_eyes.ino @@ -0,0 +1,140 @@ +/************************************************************************/ +/* + Copyright (c) 2015 by mindsensors.com + Email: info () mindsensors () com + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include + + +// +// declare the EVShield(s) attached to your Arduino. +// +EVShield evshield(0x34,0x36); + +// +// declare the i2c devices used on EVShield(s). +// + +// +// declare analog devices attached to evshields. +// +EVs_SumoEyes seyes1; + +int inByte = 0; + +void setup() +{ + char str[80]; + + Serial.begin(115200); // start serial for output + delay(500); // wait, allowing time to + // activate the serial monitor + Serial.println ("Initializing the devices ..."); + // + // EVShield provides multiple protocols + // Initialize the protocol for EVShield + // It is best to use Hardware I2C (unless you want to use Ultrasonic). + // + evshield.init( SH_HardwareI2C ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + // + // Initialize the i2c sensors. + // + + // initialize the analog sensors. + seyes1.init( &evshield, SH_BBS1 ); + + Serial.println("\nEnter a character and press 'Send' to begin"); + // + // wait until user enters a key on serial window. + // + while (Serial.available() <= 0) { + delay(1000); + } +} + +void +loop() +{ + int seyesValue; + SE_Zone obzone; + char str[256]; + char aa[80]; + int accl_x; + bool touchPressed; + bool status; + bool zone = true; + + while (true) { + + if (Serial.available() > 0) { + // + // get user input from serial window + // + inByte = Serial.read(); + sprintf (str, "input: %c", inByte); + Serial.println(str); + + switch (inByte) { + // if you want to implement any key input processing. + // do it here. + + default: + break; + } + } else { + + + Serial.println("----------------------------------------------"); + zone = !zone; + if ( zone ) { + status = seyes1.setLongRange(); + delay (500); + } else { + status = seyes1.setShortRange(); + delay (500); + } + seyesValue = seyes1.readRaw(); + obzone = seyes1.detectObstacleZone(); + + sprintf (str, "Sumo Eyes (Range: %s) raw value: %d, obzone: %d (%s)", + zone?"Long":"Short", + seyesValue, obzone, + seyes1.OBZoneToString(obzone) ); + Serial.println(str); + + Serial.println("----------------------------------------------"); + + } + delay (1500); + } +} + diff --git a/EVShield_examples/tank_drive_with_pspnx/tank_drive_with_pspnx.ino b/EVShield_examples/tank_drive_with_pspnx/tank_drive_with_pspnx.ino new file mode 100644 index 0000000..837c9b0 --- /dev/null +++ b/EVShield_examples/tank_drive_with_pspnx/tank_drive_with_pspnx.ino @@ -0,0 +1,147 @@ +/************************************************************************/ +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +************************************************************************/ +/* +For beginners tutorial (and user guide) visit: +http://www.openelectrons.com/docs/viewdoc/25 +*/ + +#include +#include +#include +#include + +EVShield evshield(0x34,0x36); + +byte ra, rb; +uint8_t motor_status; +uint8_t stalled; +// create our sensor variables. +EVs_EV3Ultrasonic sonar; +EVs_PSPNx pspnx; + +void +setup() +{ + Serial.begin(115200); // start serial for output + delay(100); // wait allowing time to + // activate the serial monitor + + long rotations = 1; // Define variable rotations and set + // equal to 90 + char str[40]; + stalled = 0; + + evshield.init( SH_HardwareI2C ); + + uint8_t v; + + v = evshield.bank_a.readByte(SH_VOLTAGE); + sprintf (str, "voltage byte: %d", v); + Serial.println ( str ); + + int voltage; + voltage = evshield.bank_a.evshieldGetBatteryVoltage(); + Serial.print ("Voltage (milli-volts): "); + Serial.println ( voltage ); + + // + // reset motors. + // + evshield.bank_a.motorReset(); + evshield.bank_b.motorReset(); + + // + // Initialize the i2c sensors. + // + sonar.init( &evshield, SH_BBS1 ); + pspnx.init( &evshield, SH_BBS2 ); + + // + // Wait until user presses GO button to continue the program + // + Serial.println ("Press GO button to continue"); + evshield.waitForButtonPress(BTN_GO); + + /* + Serial.println("\nEnter a character and press 'Send' to begin"); + // + // wait until user enters a key on serial window. + // + while (Serial.available() <= 0) { + delay(1000); + } + */ +} + +void +loop() // After the setup the LED blinks to show + // the program is complete +{ + int8_t yl, xl, yr, xr, button_set1[8], button_set2[8]; + static uint8_t r, g, b; + char str[50]; + xl = pspnx.getXLJoy(); + yl = pspnx.getYLJoy(); + yr = pspnx.getYRJoy(); + xr = pspnx.getXRJoy(); + sprintf (str, "xl: %d, yl: %d, xr: %d, yr: %d", xl, yl, xr, yr); + Serial.println(str); + if ( yl < 10 && yl > -10 ) { + // stop the motors if the jostick values are very small + evshield.bank_a.motorStop(SH_Motor_2, SH_Next_Action_Brake); + } else { + evshield.bank_a.motorRunUnlimited(SH_Motor_2, SH_Direction_Reverse, yl); + } + if ( yr < 10 && yr > -10 ) { + // stop the motors if the jostick values are very small + evshield.bank_b.motorStop(SH_Motor_2, SH_Next_Action_Brake); + } else { + evshield.bank_b.motorRunUnlimited(SH_Motor_2, SH_Direction_Reverse, yr); + } + pspnx.getButtons(button_set1, button_set2); + // blink the LED in different colors + // when you press L1/L2/R1/R2 buttons + if ( button_set2[BS2_Button_R2] == 0 ) { + delay (200); + if ( r != 0 ) r = 0; + else r = 8; + } + if ( button_set2[BS2_Button_R1] == 0 ) { + delay (200); + if ( g != 0 ) g = 0; + else g = 8; + } + if ( button_set2[BS2_Button_L2] == 0 ) { + delay (200); + if ( b != 0 ) b = 0; + else b = 8; + } + if ( button_set2[BS2_Button_L1] == 0 ) { + delay (200); + if ( r != 0 || g != 0 || b != 0 ) { + r = g = b = 0; + } else { + r = g = b = 8; + } + } + evshield.ledSetRGB(r, g, b); + delay (100); +} + + + diff --git a/EVs_AbsoluteIMU.cpp b/EVs_AbsoluteIMU.cpp new file mode 100644 index 0000000..da2c443 --- /dev/null +++ b/EVs_AbsoluteIMU.cpp @@ -0,0 +1,90 @@ +// EVs_AbsoluteIMU.cpp +// +// This is a class for controlling the AbsoluteIMU Sensor made by Mindsensors. +// Seehttp://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=169 + +// Initial version: 2013-01-22 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_AbsoluteIMU.h" + + +EVs_AbsoluteIMU::EVs_AbsoluteIMU(uint8_t i2c_address) + : EVShieldI2C(i2c_address) +{ + +} + +uint8_t EVs_AbsoluteIMU::issueCommand(char command) +{ + return writeByte(IMU_Command, (uint8_t) command); +} + +void EVs_AbsoluteIMU::readGyro(gyro &currgyro) +{ + char *b; + char str[200]; + b = readString(0x53, 6); + currgyro.gx = readIntFromBuffer((uint8_t *)&b[0]); + currgyro.gy = readIntFromBuffer((uint8_t *)&b[2]); + currgyro.gz = readIntFromBuffer((uint8_t *)&b[4]); + currgyro.error = getErrorCode(); +} + +void EVs_AbsoluteIMU::readCompass(cmps &currcmps) +{ + char str[200]; + currcmps.heading = readInteger(0x4b); + currcmps.error = getErrorCode(); +} + +void EVs_AbsoluteIMU::readAccelerometer(accl &currAccl) +{ + char *b; + char str[200]; + currAccl.tx = readByte(0x42); + currAccl.ty = readByte(0x43); + currAccl.tz = readByte(0x44); + b = readString(0x45, 6); + currAccl.ax = readIntFromBuffer((uint8_t *)&b[0]); + currAccl.ay = readIntFromBuffer((uint8_t *)&b[2]); + currAccl.az = readIntFromBuffer((uint8_t *)&b[4]); + currAccl.error = getErrorCode(); +} +void EVs_AbsoluteIMU::readMagneticField(magnetic_field &currmagnetic_field) +{ + char *b; + char str[200]; + b = readString(0x4d, 6); + currmagnetic_field.mx = readIntFromBuffer((uint8_t *)&b[0]); + currmagnetic_field.my = readIntFromBuffer((uint8_t *)&b[2]); + currmagnetic_field.mz = readIntFromBuffer((uint8_t *)&b[4]); + currmagnetic_field.error = getErrorCode(); +} +bool EVs_AbsoluteIMU::beginCompassCalibration() +{ + return issueCommand('C'); +} +bool EVs_AbsoluteIMU::endCompassCalibration() +{ + return issueCommand('c'); +} + diff --git a/EVs_AbsoluteIMU.h b/EVs_AbsoluteIMU.h new file mode 100644 index 0000000..475f069 --- /dev/null +++ b/EVs_AbsoluteIMU.h @@ -0,0 +1,160 @@ + +// EVs_AbsoluteIMU.h +// +// This is a class for reading from AbsoluteIMU, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=169 + +// Initial version: 2013-01-22 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil.Deepak Patil + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_AbsoluteIMU_H +#define EVs_AbsoluteIMU_H + +/*! + \def IMU_Command + Command register used for calibration and sensitivity changes +*/ +#define IMU_Command 0x41 + +#include "EVShieldI2C.h" + +/** + * \struct magnetic_field + Magnetic Field related data + */ +struct magnetic_field +{ + short mx_h; /*! 3) return -1; + return readLocationByte((0x81+(channel*2)+m_offset) ); +} + +uint8_t EVs_EV3Infrared::readChannelProximity(uint8_t channel) +{ + if ( channel < 0 || channel > 3) return -1; + return readLocationByte((0x82+(channel*2)+m_offset) ); +} + +uint8_t EVs_EV3Infrared::readChannelButton(uint8_t channel) +{ + if ( channel < 0 || channel > 3) return -1; + return readLocationByte((0x82+(channel)+m_offset) ); +} + diff --git a/EVs_EV3Infrared.h b/EVs_EV3Infrared.h new file mode 100644 index 0000000..73d925f --- /dev/null +++ b/EVs_EV3Infrared.h @@ -0,0 +1,58 @@ +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_EV3Infrared_H +#define EVs_EV3Infrared_H + +#include "EVShieldUART.h" + +/** + * \enum MODE_Infrared, Modes supported by EV3 Infrared Sensor. + */ +typedef enum { + MODE_Infrared_Proximity = 0x00, /*!< for measuring Proximity with EV3 Infrared sensor */ + MODE_Infrared_Beacon = 0x01, /*!< for measuring in Mode Beacon (returns 8 bytes values - 2 per channel) */ + MODE_Infrared_Remote = 0x02 /*!< for Remote mode */ + +} MODE_Infrared; + +/** + @brief This class interfaces with LEGO EV3 Touch sensor attached to EVShield + */ +class EVs_EV3Infrared : public EVShieldUART +{ +public: + /** check if the touch sensor is pressed */ + bool init(EVShield * shield, SH_BankPort bp); + + + /** for mode MODE_Infrared_Proximity */ + uint16_t readProximity(); + + /** in mode: MODE_Infrared_Beacon and MODE_InfraRed_Proximity */ +int8_t readChannelHeading(uint8_t channel); + uint8_t readChannelProximity(uint8_t channel); + + /** in mode MODE_Infrared_Remote */ + uint8_t readChannelButton(uint8_t channel); +}; + +#endif + diff --git a/EVs_EV3Touch.cpp b/EVs_EV3Touch.cpp new file mode 100644 index 0000000..8b2eb67 --- /dev/null +++ b/EVs_EV3Touch.cpp @@ -0,0 +1,44 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_EV3Touch.h" + +bool EVs_EV3Touch::init(EVShield * shield, SH_BankPort bp) +{ + EVShieldUART::init(shield, bp); + EVShieldUART::setType(SH_Type_EV3_SWITCH); +} + +bool EVs_EV3Touch::isPressed() +{ + return ( readLocationByte(0x83+m_offset) ); +} + +int EVs_EV3Touch::getBumpCount() +{ + return (readLocationByte(0x84+m_offset)); +} + +bool EVs_EV3Touch::resetBumpCount() +{ + return (writeLocation(0x84+m_offset, 0)); +} + diff --git a/EVs_EV3Touch.h b/EVs_EV3Touch.h new file mode 100644 index 0000000..6dd6a5b --- /dev/null +++ b/EVs_EV3Touch.h @@ -0,0 +1,56 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_EV3Touch_H +#define EVs_EV3Touch_H + +#include "EVShieldUART.h" + +/** + @brief This class interfaces with LEGO EV3 Touch sensor attached to EVShield + */ +class EVs_EV3Touch : public EVShieldUART +{ +public: + /** initialize the interface and tell the shield where the sensor is connected */ + bool init(EVShield * shield, SH_BankPort bp); + + /** check if the touch sensor is pressed (or bumped) */ + bool isPressed(); + + /** You can get bump count for EV3Touch Sensor (an incremental + pressed value) this function will return the bump count since last reset. + (The max value of bumpCount is 254, after that it will not increment). + + Programming Tip: + If you don't want to wait to see if button is pressed, + use this bump count, + store the old bumpCount in a variable and see if the new + bumpCount is larger than the old value. + */ + int getBumpCount(); + + /** reset the bump count and start the incremental bumps from zero */ + bool resetBumpCount(); +}; + +#endif + diff --git a/EVs_EV3Ultrasonic.cpp b/EVs_EV3Ultrasonic.cpp new file mode 100644 index 0000000..141e600 --- /dev/null +++ b/EVs_EV3Ultrasonic.cpp @@ -0,0 +1,46 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_EV3Ultrasonic.h" + +bool EVs_EV3Ultrasonic::init(EVShield * shield, SH_BankPort bp) +{ + EVShieldUART::init(shield, bp); + EVShieldUART::setType(SH_Type_EV3); +} + +float EVs_EV3Ultrasonic::getDist() +{ + uint16_t l, m; + float result; + readAndPrint(0x81+m_offset, 10); + result = readValue(); + return (result/10); +} + +uint8_t EVs_EV3Ultrasonic::detect() +{ + uint16_t l, m; + uint8_t result; + readAndPrint(0x81+m_offset, 10); + result = readValue(); + return (result); +} diff --git a/EVs_EV3Ultrasonic.h b/EVs_EV3Ultrasonic.h new file mode 100644 index 0000000..b7fa677 --- /dev/null +++ b/EVs_EV3Ultrasonic.h @@ -0,0 +1,52 @@ +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_EV3Ultrasonic_H +#define EVs_EV3Ultrasonic_H + +#include "EVShieldUART.h" + +/** + * \enum MODE_Sonar, Modes supported by EV3 Sonar (Ultrasonic Sensor). + */ +typedef enum { + MODE_Sonar_CM = 0x00, /*!< Choose for measurements in centimeters */ + MODE_Sonar_Inches = 0x01, /*!< Choose measurements in inches */ + MODE_Sonar_Presence = 0x02, /*!< Choose to Listen for other ultrasonic devices */ +} MODE_Sonar; + +/** + @brief This class interfaces with LEGO EV3 Touch sensor attached to EVShield + */ +class EVs_EV3Ultrasonic : public EVShieldUART +{ +public: + /** initialize the device and tell where it is connected */ + bool init(EVShield * shield, SH_BankPort bp); + + /** get the distance to obstacle (in cm or inches based on the mode.) */ + float getDist(); + + /** detect other ultrasonic devices */ + uint8_t detect(); +}; + +#endif + diff --git a/EVs_LightSensorArray.cpp b/EVs_LightSensorArray.cpp new file mode 100644 index 0000000..1c574e8 --- /dev/null +++ b/EVs_LightSensorArray.cpp @@ -0,0 +1,105 @@ + +// EVs_LightSensorArray.cpp +// +// This is a class for reading from LightSensorArray made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=168 + +// Initial version: 2013-01-25 by Michael Giles +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_LightSensorArray.h" + + +EVs_LightSensorArray::EVs_LightSensorArray(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} + +uint8_t EVs_LightSensorArray::issueCommand(char command) +{ + return writeByte(LightSensorArray_Command, (uint8_t)command); +} + +bool EVs_LightSensorArray::calibrateWhite() +{ + return issueCommand('W'); +} + +bool EVs_LightSensorArray::calibrateBlack() +{ + return issueCommand('B'); +} + +bool EVs_LightSensorArray::sleep() +{ + return issueCommand('D'); +} + +bool EVs_LightSensorArray::wakeUp() +{ + return issueCommand('P'); +} + +bool EVs_LightSensorArray::configureUS() +{ + return issueCommand('A'); +} + +bool EVs_LightSensorArray::configureEurope() +{ + return issueCommand('E'); +} + +bool EVs_LightSensorArray::configureUniversal() +{ + return issueCommand('U'); +} + +uint8_t* EVs_LightSensorArray::getCalibrated() +{ + return (uint8_t *) readString (LightSensorArray_Calibrated, 8); +} + +uint8_t* EVs_LightSensorArray::getUncalibrated() +{ + return (uint8_t *) readString (LightSensorArray_Uncalibrated, 16); +} + +uint8_t* EVs_LightSensorArray::getWhiteLimit() +{ + return (uint8_t *)readString (LightSensorArray_White_Limit, 8); +} + +uint8_t* EVs_LightSensorArray::getBlackLimit() +{ + return (uint8_t *)readString (LightSensorArray_Black_Limit, 8); +} + +uint8_t* EVs_LightSensorArray::getWhiteCalibration() +{ + return (uint8_t *)readString (LightSensorArray_White_Calibration, 8); +} + +uint8_t* EVs_LightSensorArray::getBlackCalibration() +{ + return (uint8_t *)readString (LightSensorArray_Black_Calibration, 8); +} diff --git a/EVs_LightSensorArray.h b/EVs_LightSensorArray.h new file mode 100644 index 0000000..65ee5da --- /dev/null +++ b/EVs_LightSensorArray.h @@ -0,0 +1,100 @@ + +// EVs_LightSensorArray.h +// +// This is a class for reading from LightSensorArray made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=168 + +// Initial version: 2013-01-25 by Michael Giles +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_LightSensorArray_H +#define EVs_LightSensorArray_H + +#define LightSensorArray_Calibrated 0x42 +#define LightSensorArray_Uncalibrated 0x6A +#define LightSensorArray_White_Limit 0x4A +#define LightSensorArray_Black_Limit 0x52 +#define LightSensorArray_White_Calibration 0x5A +#define LightSensorArray_Black_Calibration 0x62 + +#define LightSensorArray_Command 0x41 + +#include "EVShieldI2C.h" + + + /** @brief This class interfaces with LightSensorArray attached to EVShield + */ +class EVs_LightSensorArray : public EVShieldI2C +{ +public: + /** Class constructor for LightSensorArray; custom i2c address is an optional parameter */ + EVs_LightSensorArray(uint8_t i2c_address = 0x02); + + /** Write a command byte to the command register of the device */ + uint8_t issueCommand(char command); + + /** Calibrate the current input to the device as white */ + bool calibrateWhite(); + + /** Calibrate the current input to the device as black */ + bool calibrateBlack(); + + /** Turn off the LEDs on the device and put it in the sleep state */ + bool sleep(); + + /** Turn on the LEDs and wake up the device */ + bool wakeUp(); + + /** Configure Sensor for US region (and regions with 60 Hz electrical frequency). */ + bool configureUS(); + + /** Configure sensor for European region (and regions with 50 Hz electrical frequency). */ + bool configureEurope(); + + /** Configure sensor for universal frequency (in this mode the sensor adjusts for any frequency, this is also the default mode). */ + bool configureUniversal(); + + /** Get the raw readings from the sensor that is calibrated based on black and white calibration values + @return array of 8 bytes of the sensors' calibrated values. */ + uint8_t* getCalibrated(); + + /** Get the raw uncalibrated sensor values straight from the sensor + @return array of 8 bytes of the sensors' uncalibrated values. */ + uint8_t* getUncalibrated(); + + /** Get the limit at which white changes to black */ + uint8_t* getWhiteLimit(); + + /** Get the limit at which black changes to white */ + uint8_t* getBlackLimit(); + + /** Calibrate White + @return Current calibration of white */ + uint8_t* getWhiteCalibration(); + + /** Calibrate Black + @return the current calibration of black */ + uint8_t* getBlackCalibration(); + +}; + +#endif diff --git a/EVs_LineLeader.cpp b/EVs_LineLeader.cpp new file mode 100644 index 0000000..89bb9e6 --- /dev/null +++ b/EVs_LineLeader.cpp @@ -0,0 +1,205 @@ + +// EVs_LineLeader.cpp +// +// This is a class for reading from LineLeader Sensor made by Openelectrons.com. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=111 + +// Initial version: 2010-06-15 by Andrew Sylvester +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_LineLeader.h" + + +EVs_LineLeader::EVs_LineLeader(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} + +uint8_t EVs_LineLeader::issueCommand(char command) +{ + return writeByte(LineLeader_Command, (uint8_t)command); +} + +bool EVs_LineLeader::calibrateWhite() +{ + return issueCommand('W'); +} + +bool EVs_LineLeader::calibrateBlack() +{ + return issueCommand('B'); +} + +bool EVs_LineLeader::sleep() +{ + return issueCommand('D'); +} + +bool EVs_LineLeader::wakeUp() +{ + return issueCommand('P'); +} + +bool EVs_LineLeader::invertLineColorToWhite() +{ + return issueCommand('I'); +} + +bool EVs_LineLeader::resetColorInversion() +{ + return issueCommand('R'); +} + +bool EVs_LineLeader::takeSnapshot() +{ + return issueCommand('S'); +} + +bool EVs_LineLeader::configureUS() +{ + return issueCommand('A'); +} + +bool EVs_LineLeader::configureEurope() +{ + return issueCommand('E'); +} + +bool EVs_LineLeader::configureUniversal() +{ + return issueCommand('U'); +} + +uint8_t EVs_LineLeader::getSetPoint() +{ + return readByte(LineLeader_SetPoint); +} + +bool EVs_LineLeader::setSetPoint(uint8_t spoint) +{ + return writeByte(LineLeader_SetPoint, (uint8_t)spoint); +} + +uint8_t EVs_LineLeader::getKp(uint8_t kp) +{ + return readByte(LineLeader_Kp); +} + +bool EVs_LineLeader::setKp(uint8_t kp) +{ + return writeByte(LineLeader_Kp, (uint8_t)kp); +} + +uint8_t EVs_LineLeader::getKi(uint8_t ki) +{ + return readByte(LineLeader_Ki); +} + +bool EVs_LineLeader::setKi(uint8_t ki) +{ + return writeByte(LineLeader_Ki, (uint8_t)ki); +} + +uint8_t EVs_LineLeader::getKd(uint8_t kd) +{ + return readByte(LineLeader_Kd); +} + +bool EVs_LineLeader::setKd(uint8_t kd) +{ + return writeByte(LineLeader_Kd, (uint8_t)kd); +} + +uint8_t EVs_LineLeader::getKpFactor(uint8_t kpfact) +{ + return readByte(LineLeader_Kp); +} + +bool EVs_LineLeader::setKpFactor(uint8_t kpfact) +{ + return writeByte(LineLeader_Kp_Factor, (uint8_t)kpfact); +} + +uint8_t EVs_LineLeader::getKiFactor(uint8_t kifact) +{ + return readByte(LineLeader_Ki); +} + +bool EVs_LineLeader::setKiFactor(uint8_t kifact) +{ + return writeByte(LineLeader_Ki_Factor, (uint8_t)kifact); +} + +uint8_t EVs_LineLeader::getKdFactor(uint8_t kdfact) +{ + return readByte(LineLeader_Kd); +} + +bool EVs_LineLeader::setKdFactor(uint8_t kdfact) +{ + return writeByte(LineLeader_Kd_Factor, (uint8_t)kdfact); +} + +int EVs_LineLeader::getSteering() +{ + return readByte(LineLeader_Steering); +} + +unsigned char EVs_LineLeader::getAverage() +{ + return readByte(LineLeader_Average); +} + +unsigned char EVs_LineLeader::getResult() +{ + return readByte(LineLeader_Result); +} + +uint8_t* EVs_LineLeader::getRawCalibrated() +{ + return (uint8_t *) readString (LineLeader_Raw_Calibrated, 8); +} + +uint8_t* EVs_LineLeader::getRawUncalibrated() +{ + return (uint8_t *) readString (LineLeader_Raw_Uncalibrated, 16); +} + +uint8_t* EVs_LineLeader::getWhiteLimit() +{ + return (uint8_t *)readString (LineLeader_White_Limit, 8); +} + +uint8_t* EVs_LineLeader::getBlackLimit() +{ + return (uint8_t *)readString (LineLeader_Black_Limit, 8); +} + +uint8_t* EVs_LineLeader::getWhiteCalibration() +{ + return (uint8_t *)readString (LineLeader_White_Calibration, 8); +} + +uint8_t* EVs_LineLeader::getBlackCalibration() +{ + return (uint8_t *)readString (LineLeader_Black_Calibration, 8); +} diff --git a/EVs_LineLeader.h b/EVs_LineLeader.h new file mode 100644 index 0000000..71a7de7 --- /dev/null +++ b/EVs_LineLeader.h @@ -0,0 +1,194 @@ + +// EVs_LineLeader.h +// +// This is a class for reading from LineLeader Sensor made by Openelectrons.com. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=111 + +// Initial version: 2010-06-15 by Andrew Sylvester +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_LineLeader_H +#define EVs_LineLeader_H + +#define LineLeader_Raw_Calibrated 0x49 +#define LineLeader_Raw_Uncalibrated 0x74 +#define LineLeader_White_Limit 0x51 +#define LineLeader_Black_Limit 0x59 +#define LineLeader_White_Calibration 0x64 +#define LineLeader_Black_Calibration 0x6C + + +#define LineLeader_Command 0x41 +#define LineLeader_Steering 0x42 +#define LineLeader_Average 0x43 +#define LineLeader_Result 0x44 +#define LineLeader_SetPoint 0x45 +#define LineLeader_Kp 0x46 +#define LineLeader_Ki 0x47 +#define LineLeader_Kd 0x48 +#define LineLeader_Kp_Factor 0x61 +#define LineLeader_Ki_Factor 0x62 +#define LineLeader_Kd_Factor 0x63 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with NXTLineLeader sensor attached to EVShield + */ +class EVs_LineLeader : public EVShieldI2C +{ +public: + /** class constructor for LineLeader; custom i2c address is an optional parameter */ + EVs_LineLeader(uint8_t i2c_address = 0x02); + + /** write a command byte to the command register of the device */ + uint8_t issueCommand(char command); + + /** calibrate the current input to the device as white */ + bool calibrateWhite(); + + /** calibrate the current input to the device as black */ + bool calibrateBlack(); + + /** turn off the LEDs on the device and put it in the sleep state */ + bool sleep(); + + /** turn on the LEDs and wake up the device */ + bool wakeUp(); + + /** Color inversion (White line on a black background) + */ + bool invertLineColorToWhite(); + + /** Reset Color inversion (black line on a white background, this is also the default). + */ + bool resetColorInversion(); + + /** +Take a snapshot, this command looks at the line under the sensor and stores the width and position of the line in sensor’s memory. Subsequently, sensor will use these characteristics of line to track it. This command inverts the colors if it sees a white line on black background. (PID parameters are not affected). + */ + bool takeSnapshot(); + + /** Configure Sensor for US region (and regions with 60 Hz electrical frequency). + */ + bool configureUS(); + + /** Configure sensor for European region (and regions with 50 Hz electrical frequency) + */ + bool configureEurope(); + + /** Configure sensor for universal frequency (in this mode the sensor adjusts for any frequency, this is also the default mode). + */ + bool configureUniversal(); + + /** returns the current setpoint used by the PID control on the device */ + uint8_t getSetPoint(); + + /** set the desired point relative to the 8 sensors for PID control */ + bool setSetPoint(uint8_t spoint); + + /** get the current proportion factor for PID control */ + uint8_t getKp(uint8_t kp); + + /** set the proportion factor for PID control */ + bool setKp(uint8_t kp); + + /** get the current integral factor for PID control */ + uint8_t getKi(uint8_t ki); + + /** set the integral factor for PID control */ + bool setKi(uint8_t ki); + + /** get the current derivative factor for PID control */ + uint8_t getKd(uint8_t kd); + + /** set the derivative factor for PID control */ + bool setKd(uint8_t kd); + + /** + Get the Kp factor + @return kp factor + */ + uint8_t getKpFactor(uint8_t kpfact); + + /** + Set the Kp factor + */ + bool setKpFactor(uint8_t kpfact); + + /** + Get the Ki factor + @return ki factor + */ + uint8_t getKiFactor(uint8_t kifact); + + /** + Set the Ki factor + */ + bool setKiFactor(uint8_t kifact); + + /** + Get the Kd factor + @return kd factor + */ + uint8_t getKdFactor(uint8_t kdfact); + + /** + Set the Kd factor + */ + bool setKdFactor(uint8_t kdfact); + + /** current steering value, add or subtract from the speed of motors on each side */ + int getSteering(); + + /** returns a weighted average of the current position of the line in relation to the sensor */ + unsigned char getAverage(); + + /** returns a byte of the current result; each bit corresponds to one light sensor */ + unsigned char getResult(); + + /** + get the raw readings from the sensor that is calibrated based on black and white calibration values + @return array of 8 bytes of the sensors' calibrated values. + */ + uint8_t* getRawCalibrated(); + + /** get the raw uncalibrated sensor values straight from the sensor + @return array of 8 bytes of the sensors' uncalibrated values. + */ + uint8_t* getRawUncalibrated(); + + /** get the limit at which white changes to black */ + uint8_t* getWhiteLimit(); + + /** get the limit at which black changes to white */ + uint8_t* getBlackLimit(); + + /** returns the current calibration of white */ + uint8_t* getWhiteCalibration(); + + /** returns the current calibration of black */ + uint8_t* getBlackCalibration(); + +}; + +#endif /* LineLeader_H_ */ diff --git a/EVs_MagicWand.cpp b/EVs_MagicWand.cpp new file mode 100644 index 0000000..da84391 --- /dev/null +++ b/EVs_MagicWand.cpp @@ -0,0 +1,34 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_MagicWand.h" + +EVs_MagicWand::EVs_MagicWand(uint8_t i2c_address) : EVShieldI2C(i2c_address) +{ + +} + +void EVs_MagicWand::lightWand(uint8_t byteToWrite){ + writeByte(byteToWrite,byteToWrite); +} + + + diff --git a/EVs_MagicWand.h b/EVs_MagicWand.h new file mode 100644 index 0000000..e38516d --- /dev/null +++ b/EVs_MagicWand.h @@ -0,0 +1,42 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_MagicWand_H +#define EVs_MagicWand_H +#include "EVShieldI2C.h" + +#define MagicWand_WR_Register 0x00 + +/** + @brief This class interfaces with Magic Wand attached to EVShield + */ +class EVs_MagicWand : public EVShieldI2C +{ + +public: + /** class constructor for the MagicWand; the i2c address for this device cannot be changed */ + EVs_MagicWand(uint8_t devAddr = 0x70); + + /** light the want; each bit of the byteToWrite represents one LED; 0 is on and 1 is off */ + void lightWand(uint8_t byteToWrite); +}; + +#endif diff --git a/EVs_NXTCam.cpp b/EVs_NXTCam.cpp new file mode 100644 index 0000000..a5ebd97 --- /dev/null +++ b/EVs_NXTCam.cpp @@ -0,0 +1,139 @@ + +// EVs_NXTCam.cpp +// +// This is a class for controlling the NXT Cam, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78 . + +// Initial version: 2010-06-18 by Andrew Sylvester +// Modified for EVShield: 2015-02-24 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_NXTCam.h" + + +EVs_NXTCam::EVs_NXTCam(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} + +uint8_t EVs_NXTCam::issueCommand(char command) +{ + return writeByte(Cam_Command, (uint8_t)command); +} + +bool EVs_NXTCam::sortSize() +{ + return issueCommand('A'); +} + +bool EVs_NXTCam::selectObjectMode() +{ + return issueCommand('B'); +} + +bool EVs_NXTCam::writeImageRegisters() +{ + return issueCommand('C'); +} + +bool EVs_NXTCam::disableTracking() +{ + return issueCommand('D'); +} + +bool EVs_NXTCam::enableTracking() +{ + return issueCommand('E'); +} + +bool EVs_NXTCam::getColorMap() +{ + return issueCommand('G'); +} + +bool EVs_NXTCam::illuminationOn() +{ + return issueCommand('I'); +} + +bool EVs_NXTCam::readImageRegisters() +{ + return issueCommand('H'); +} + +bool EVs_NXTCam::selectLineMode() +{ + return issueCommand('L'); +} + +bool EVs_NXTCam::pingCam() +{ + return issueCommand('P'); +} + +bool EVs_NXTCam::resetCam() +{ + return issueCommand('R'); +} + +bool EVs_NXTCam::sendColorMap() +{ + return issueCommand('S'); +} + +bool EVs_NXTCam::illuminationOff() +{ + return issueCommand('T'); +} + +bool EVs_NXTCam::sortColor() +{ + return issueCommand('U'); +} + +bool EVs_NXTCam::camFirmware() +{ + return issueCommand('V'); +} + +bool EVs_NXTCam::sortNone() +{ + return issueCommand('X'); +} + +int EVs_NXTCam::getNumberObjects() +{ + return readByte(Cam_Number_Objects); +} + +void EVs_NXTCam::getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom) +{ + *nblobs = readByte(Cam_Number_Objects); + for (int i = 0; i < *nblobs; i++) { + uint8_t* buf ; + buf = (uint8_t *) readString (Start_Reg +(i*5), 5); + color[i] = buf[0] & 0x00FF; + left[i] = buf[1] & 0x00FF; + top[i] = buf[2] & 0x00FF; + right[i] = buf[3] & 0x00FF; + bottom[i] = buf[4] & 0x00FF; + } +} diff --git a/EVs_NXTCam.h b/EVs_NXTCam.h new file mode 100644 index 0000000..04b87a8 --- /dev/null +++ b/EVs_NXTCam.h @@ -0,0 +1,126 @@ + +// EVs_NXTCam.h +// +// This is a class for controlling the NXT Cam, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78 . + +// Initial version: 2010-06-18 by Andrew Sylvester +// Modified for EVShield: 2015-02-15 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_NXTCam_H +#define EVs_NXTCam_H + +#define Cam_Command 0x41 +#define Cam_Number_Objects 0x42 +#define Start_Reg 0x43 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with NXTCam attached to EVShield + */ +class EVs_NXTCam : public EVShieldI2C +{ +public: + /** class constructor for NXTCam with optional custom i2c address parameter */ + EVs_NXTCam(uint8_t i2c_address = 0x02); + + /** issue character command byte to the command register of the NXTCam + (command such as enable tracking, stop tracking, etc). Refer to User Guide for available commands. +*/ + uint8_t issueCommand(char command); + + /** sort the blobs from the NXTCam byt blobs */ + bool sortSize(); + + /** configure the tracking mode of the device to object tracking */ + bool selectObjectMode(); + + /** write to the image registers of the CCD */ + bool writeImageRegisters(); + + /** disable tracking for the NXTCam */ + bool disableTracking(); + + /** enable tracking for the NXTCam */ + bool enableTracking(); + + /** get the current colormap of the NXTCam */ + bool getColorMap(); + +/** not impmemented yet */ + bool illuminationOn(); + + /** read the image registers of the CCD */ + bool readImageRegisters(); + + /** put the NXTCam in line tracking mode */ + bool selectLineMode(); + + /** ping the NXTCam to test connection */ + bool pingCam(); + + /** reset the NXTCam */ + bool resetCam(); + + /** send ColorMap to the NXTCam */ + bool sendColorMap(); + +/** not impmemented yet */ + bool illuminationOff(); + + /** sort the blobs by color */ + bool sortColor(); + + /** clear any selected sort configuration */ + bool sortNone(); + + /** get the firmware of the NXTCam */ + bool camFirmware(); + + /** get the total number of objected tracked by the NXTCam */ + int getNumberObjects(); + + +/** +This function gets the blob information of all the blobs that NXTCam is tracking. +There could be upto 8 blobs being tracked by NXTCam. +All the parameters of this function are return values. +This function will return color and coordinate information for all the blobs. + @param nblobs In this variable, number of blobs NXTCam sees are returned. +The blobs NXTCam sees could be of different color or same color. +For e.g. if you have 3 colors defined, say red (color 1), blue (color 2) and green (color3), and you have 3 red objects and 2 blue objects and 1 green object in front of NXTCam, nblobs will be 6. +color[]: a array of colors for the blobs +in above example, Color array will have 6 valid elements - three bytes will say 1 (for color1), and 2 bytes will say (for color 2), and 1 byte will say 3 (for color 3). +Based on sorting chosen, they will be sorted by size or color (if the sorting was color, first 3 bytes will be 1, next two will be 2 and next one will be 3). + @param color a array of colors for the blobs (array has 8 elements) + @param left the coordinate values of the blobs (array of 8 elements) + @param top the coordinate values of the blobs (array of 8 elements) + @param right the coordinate values of the blobs (array of 8 elements) + @param bottom the coordinate values of the blobs (array of 8 elements) +@return look at the nblobs first to see how many blobs are being tracked, and then read the respective color and coordinate infromation. +*/ + void getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom); + +}; + +#endif diff --git a/EVs_NXTColor.cpp b/EVs_NXTColor.cpp new file mode 100644 index 0000000..584ba75 --- /dev/null +++ b/EVs_NXTColor.cpp @@ -0,0 +1,115 @@ +/* + Copyright (c) 2015 mindsensors.com + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTColor.h" + + +EVs_NXTColor::EVs_NXTColor() +{ + mp_shield = NULL; +} + +EVs_NXTColor::EVs_NXTColor(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; + switch(m_bp) { + case SH_BAS1: + case SH_BBS1: + m_offset = 0; + break; + case SH_BAS2: + case SH_BBS2: + m_offset = 52; + break; + } + //setType(SH_Type_COLORFULL); +} + +bool EVs_NXTColor::init(EVShield * shield, SH_BankPort bp) +{ + mp_shield = shield; + m_bp = bp; + switch(m_bp) { + case SH_BAS1: + case SH_BBS1: + m_offset = 0; + break; + case SH_BAS2: + case SH_BBS2: + m_offset = 52; + break; + } + //setType(SH_Type_COLORFULL); + return true; +} + +bool EVs_NXTColor::setType(uint8_t type) +{ + if ( mp_shield == NULL) return false; + switch (m_bp) { + case SH_BAS1: + return mp_shield->bank_a.sensorSetType(SH_S1, type); + + case SH_BAS2: + return mp_shield->bank_a.sensorSetType(SH_S2, type); + + case SH_BBS1: + return mp_shield->bank_b.sensorSetType(SH_S1, type); + + case SH_BBS2: + return mp_shield->bank_b.sensorSetType(SH_S2, type); + + } +} + +uint8_t EVs_NXTColor::readValue() +{ + char str[100]; + uint8_t val; + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + val = (mp_shield->bank_a.readByte((0x70 + m_offset))); + return (val*100)/255; + case SH_BBS1: + case SH_BBS2: + val = (mp_shield->bank_b.readByte((0x70 + m_offset))); + return (val*100)/255; + } +} + +uint8_t EVs_NXTColor::readColor() +{ + char str[100]; + uint8_t val; + /* + Serial.println("NXTColor::readValue: "); + for (int i=0x70; i< 0x70+10;i++) { + Serial.print(" "); Serial.print(mp_shield->bank_a.readByte(i)); + } + Serial.println(""); + */ + switch (m_bp) { + case SH_BAS1: + case SH_BAS2: + return (mp_shield->bank_a.readByte((0x70 + m_offset))); + case SH_BBS1: + case SH_BBS2: + return (mp_shield->bank_b.readByte((0x70 + m_offset))); + } +} diff --git a/EVs_NXTColor.h b/EVs_NXTColor.h new file mode 100644 index 0000000..1bd976e --- /dev/null +++ b/EVs_NXTColor.h @@ -0,0 +1,66 @@ +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTColor_H +#define EVs_NXTColor_H + +#include "SHDefines.h" +#include "EVShield.h" + +/** + @brief EVShield Analog Sensor class. + */ +class EVs_NXTColor +{ + public: + /** pointer to the EVShield class instantiation used */ + EVShield * mp_shield; + + /** bank port the device is connected to */ + SH_BankPort m_bp; + + /** the data for uart sensors is stored in the bank, and + there is a offset based on port */ + int m_offset; + + /** null constructor for the class; need to init later */ + EVs_NXTColor(); + + /** class constructor with pointer to EVShield and the bankport as a parameter; if object is instantiated using this constructor, init is not needed */ + EVs_NXTColor(EVShield * shield, SH_BankPort bp); + + /** set the type of the device on this port of the EVShield */ + bool setType(uint8_t type); + + /** read the raw analog value from the device and return as an integer */ + //int readRaw(); + + /** initialize the analog device with a pointer to the EVShield and the bank port it is connected to */ + bool init(EVShield * shield, SH_BankPort bp); + + uint8_t readValue(); + + uint8_t readColor(); + +}; + + +#endif + diff --git a/EVs_NXTCurrentMeter.cpp b/EVs_NXTCurrentMeter.cpp new file mode 100644 index 0000000..278af52 --- /dev/null +++ b/EVs_NXTCurrentMeter.cpp @@ -0,0 +1,57 @@ +//EVs_NXTCurrentMeter.cpp +// +// This is a class controlling the NXTCurrentMeter, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=163 + +// Initial version: 2013-01-24 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTCurrentMeter.h" + +EVs_CurrentMeter::EVs_CurrentMeter(uint8_t i2c_address) + : EVShieldI2C(i2c_address) +{ + +} + +uint8_t EVs_CurrentMeter::issueCommand(char command) +{ + return writeByte(IM_Command, (uint8_t) 'd'); +} + +int EVs_CurrentMeter::getACurrent() +{ + return readInteger(ABSOLUTE_I); +} + +int EVs_CurrentMeter::getRCurrent() +{ + return readInteger(RELATIVE_I); +} + +int EVs_CurrentMeter::getReference() +{ + return readInteger(REFERENCE_I); +} + +int EVs_CurrentMeter::setReferenceI() +{ + return issueCommand('d'); +} diff --git a/EVs_NXTCurrentMeter.h b/EVs_NXTCurrentMeter.h new file mode 100644 index 0000000..6d8e43e --- /dev/null +++ b/EVs_NXTCurrentMeter.h @@ -0,0 +1,60 @@ +//EVs_NXTCurrentMeter.h +// +// This is a class for reading from NXTCurrentMeter, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=163 + +// Initial version: 2013-01-24 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTCurrentMeter_H +#define EVs_NXTCurrentMeter_H + +#define IM_Command 0x41 + +#define ABSOLUTE_I 0X43 +#define RELATIVE_I 0x45 + +#define REFERENCE_I 0X47 + +#include "EVShieldI2C.h" + /** @brief This class + * interfaces with sensor attached to EVShield */ +class EVs_CurrentMeter : public EVShieldI2C +{ +public: + /** Constructor for the class; may supply an optional custom i2c address */ + EVs_CurrentMeter(uint8_t i2c_address = 0x28); + /** Write a command byte at the command register of the device */ + uint8_t issueCommand(char command); + /** Get the Absolute Current + * @return Absolute Current value*/ + int getACurrent(); + /** Get the Relative Current + * @return Relative Current value*/ + int getRCurrent(); + /** Get the Reference Current + * @return Reference Current value*/ + int getReference(); + /** Set the Reference Current to Absolute Current */ + int setReferenceI(); + +}; + +#endif diff --git a/EVs_NXTLight.cpp b/EVs_NXTLight.cpp new file mode 100644 index 0000000..7948047 --- /dev/null +++ b/EVs_NXTLight.cpp @@ -0,0 +1,39 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTLight.h" + +bool EVs_NXTLight::init(EVShield * shield, SH_BankPort bp) +{ + EVShieldAGS::init(shield, bp); +} + +bool EVs_NXTLight::setReflected() +{ + //return setType( SH_Type_ANALOG | SH_Type_DATABIT0_HIGH ); + return setType(SH_Type_LIGHT_REFLECTED); +} + +bool EVs_NXTLight::setAmbient() +{ + return setType(SH_Type_LIGHT_AMBIENT); +} + diff --git a/EVs_NXTLight.h b/EVs_NXTLight.h new file mode 100644 index 0000000..6baae58 --- /dev/null +++ b/EVs_NXTLight.h @@ -0,0 +1,46 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_NXTLIGHT_H +#define EVs_NXTLIGHT_H + +#include "EVShieldAGS.h" + +/** + @brief This class interfaces with LEGO Light sensor attached to EVShield. + + Note, the light sensor does not work on BAS1. + */ +class EVs_NXTLight : public EVShieldAGS +{ +public: + /** initialize the NXTLight sensor with a pointer to the EVShield and the bank port it is connected to */ + bool init(EVShield * shield, SH_BankPort bp); + + /** set the NXTLight sensor mode to reflected light mode (internal LED will be turned on) */ + bool setReflected(); + + /** set the NXTLight sensor mode to ambient light mode (internal LED will be turned off) */ + bool setAmbient(); +}; + +#endif diff --git a/EVs_NXTMMX.cpp b/EVs_NXTMMX.cpp new file mode 100644 index 0000000..4ccd18f --- /dev/null +++ b/EVs_NXTMMX.cpp @@ -0,0 +1,417 @@ + +// EVs_NXTMMX.cpp +// +// Initial version: 2010-06-07 by Clinton Blackmore +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTMMX.h" + + +EVs_NXTMMX::EVs_NXTMMX(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ + // for some reason the reset command doesn't work here + //reset(); // start all encoder positions off at 0 +} + +uint8_t EVs_NXTMMX::getBatteryVoltage() +{ + return readByte(MMX_VOLTAGE)*39; +} + +uint8_t EVs_NXTMMX::issueCommand(char command) +{ + return writeByte(MMX_COMMAND, (uint8_t)command); +} + +// Set/get the encoder target for the motor (ie. a position to go +// to and stop at) +bool EVs_NXTMMX::setEncoderTarget(uint8_t which_motor, long target) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_SETPT_M1 : MMX_SETPT_M2; + return writeLong(reg, target); +} +long EVs_NXTMMX::getEncoderTarget(uint8_t which_motor) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_SETPT_M1 : MMX_SETPT_M2; + return (long)readLong(reg); +} + +// Set/get the speed of the motor +// (I believe this is in the range [-100, +100]) +bool EVs_NXTMMX::setSpeed(uint8_t which_motor, int speed) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_SPEED_M1 : MMX_SPEED_M2; + return writeByte(reg, (uint8_t)(int8_t)speed); +} +int8_t EVs_NXTMMX::getSpeed(uint8_t which_motor) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_SPEED_M1 : MMX_SPEED_M2; + return (int8_t)readByte(reg); +} + +// This is the time, in seconds, for the motor to run +bool EVs_NXTMMX::getTimeToRun(uint8_t which_motor, int seconds) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_TIME_M1 : MMX_TIME_M2; + return writeByte(reg, seconds); +} +uint8_t EVs_NXTMMX::getTimeToRun(uint8_t which_motor) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_TIME_M1 : MMX_TIME_M2; + return readByte(reg); +} + +// Command Register 'B' is currently unused, but reserved for future expansion +// If you set it, you must set it to zero. +bool EVs_NXTMMX::setCommandRegB(uint8_t which_motor, uint8_t value) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_CMD_B_M1 : MMX_CMD_B_M2; + return writeByte(reg, value); +} +uint8_t EVs_NXTMMX::getCommandRegB(uint8_t which_motor) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_CMD_B_M1 : MMX_CMD_B_M2; + return readByte(reg); +} + +// See User's Guide for what command register A does +bool EVs_NXTMMX::setCommandRegA(uint8_t which_motor, uint8_t value) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_CMD_A_M1 : MMX_CMD_A_M2; + return writeByte(reg, value); +} +uint8_t EVs_NXTMMX::getCommandRegA(uint8_t which_motor) +{ + uint8_t reg = (which_motor == MMX_Motor_1) ? MMX_CMD_A_M1 : MMX_CMD_A_M2; + return readByte(reg); +} + +// Get the current encoder position +int32_t EVs_NXTMMX::getEncoderPosition(uint8_t which_motor) +{ + uint8_t location = (which_motor == MMX_Motor_1) ? MMX_POSITION_M1 : MMX_POSITION_M2; + return (int32_t)readLong(location); +} + +// See User's Guide for documentation on the status byte +uint8_t EVs_NXTMMX::getMotorStatusByte(uint8_t which_motor) +{ + uint8_t location = (which_motor == MMX_Motor_1) ? MMX_STATUS_M1 : MMX_STATUS_M2; + return readByte(location); +} + +// (I couldn't find an explanation for this in the User's Guide) +uint8_t EVs_NXTMMX::getMotorTasksRunningByte(uint8_t which_motor) +{ + uint8_t location = (which_motor == MMX_Motor_1) ? MMX_TASKS_M1 : MMX_TASKS_M2; + return readByte(location); +} + +// Set the PID that controls how we stop as we approach the +// angle we're set to stop at +bool EVs_NXTMMX::setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd) +{ + writeIntToBuffer(_buffer + 0, Kp); + writeIntToBuffer(_buffer + 2, Ki); + writeIntToBuffer(_buffer + 4, Kd); + return writeRegisters(MMX_ENCODER_PID, 6, _buffer); +} + +// Sets the PID that controls how well that motor maintains its speed +bool EVs_NXTMMX::setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd) +{ + writeIntToBuffer(_buffer + 0, Kp); + writeIntToBuffer(_buffer + 2, Ki); + writeIntToBuffer(_buffer + 4, Kd); + return writeRegisters(MMX_SPEED_PID, 6, _buffer); +} + +// See user's guide for details. +bool EVs_NXTMMX::setPassCount(uint8_t pass_count) +{ + return writeByte(MMX_PASS_COUNT, pass_count); +} + +// Sets tolerance which adjust accuracy while positioning. +// See user's guide for more details. +bool EVs_NXTMMX::setTolerance(uint8_t tolerance) +{ + return writeByte(MMX_TOLERANCE, tolerance); +} + + +// Special I2C commands + +// Resets all encoder values and motor parameters. Leaves PIDs untouched. +bool EVs_NXTMMX::reset() +{ + return issueCommand('R'); +} + +// Tells the motors to start at the same time. +bool EVs_NXTMMX::startMotorsInSync() +{ + return issueCommand('S'); +} + +// Reset the encoder for motor 1 or motor 2 +bool EVs_NXTMMX::resetEncoder(uint8_t which_motor) +{ + char code = (which_motor == MMX_Motor_1) ? 'r' : 's'; + return issueCommand(code); +} + + +// This function sets the speed, the number of seconds, and +// the control (a.k.a. command register A) +bool EVs_NXTMMX::setSpeedTimeAndControl( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + int speed, // in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // bit flags for control purposes +{ + if (which_motors == MMX_Motor_Both) + { + control &= ~MMX_CONTROL_GO; // Clear the 'go right now' flag + bool m1 = setSpeedTimeAndControl(MMX_Motor_1, speed, duration, control); + bool m2 = setSpeedTimeAndControl(MMX_Motor_2, speed, duration, control); + startMotorsInSync(); + return m1 && m2; + } + + _buffer[0] = (uint8_t)(int8_t)speed; + _buffer[1] = duration; + _buffer[2] = 0; // command register B + _buffer[3] = control; // command register A + + uint8_t reg = (which_motors == MMX_Motor_1) ? MMX_SPEED_M1 : MMX_SPEED_M2; + return writeRegisters(reg, 4); +} + +void setEncoderSpeedTimeAndControlInBuffer( + uint8_t* buffer, // pointer to the buffer + long encoder, // encoder value + int speed, // speed, in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // control flags +{ + writeLongToBuffer(buffer + 0, encoder); + buffer[4] = (uint8_t)(int8_t)speed; + buffer[5] = duration; + buffer[6] = 0; // command register B + buffer[7] = control; // command register A +} + + +// This function sets the speed, the number of seconds, and +// the control (a.k.a. command register A) +bool EVs_NXTMMX::setEncoderSpeedTimeAndControl( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + long encoder, // encoder/tachometer position + int speed, // speed, in range [-100, +100] + uint8_t duration, // in seconds + uint8_t control) // control flags +{ + if (which_motors == MMX_Motor_Both) + { + // The motor control registers are back to back, and both can be written in one command + control &= ~MMX_CONTROL_GO; // Clear the 'go right now' flag + setEncoderSpeedTimeAndControlInBuffer(_buffer + 0, encoder, speed, duration, control); + setEncoderSpeedTimeAndControlInBuffer(_buffer + 8, encoder, speed, duration, control); + bool success = writeRegisters(MMX_SETPT_M1, 16); + startMotorsInSync(); + return success; + } + + // Or, just issue the command for one motor + setEncoderSpeedTimeAndControlInBuffer(_buffer, encoder, speed, duration, control); + uint8_t reg = (which_motors == MMX_Motor_1) ? MMX_SETPT_M1 : MMX_SETPT_M2; + return writeRegisters(reg, 8); +} + +// True when a motor has completed a timed move +bool EVs_NXTMMX::isTimeDone(uint8_t which_motors) +{ + if (which_motors == MMX_Motor_Both) + { + return isTimeDone(MMX_Motor_1) && isTimeDone(MMX_Motor_2); + } + uint8_t status = getMotorStatusByte(which_motors); + return (status & MMX_CONTROL_TIME) == 0; +} + +// waited until a timed command finishes +void EVs_NXTMMX::waitUntilTimeDone(uint8_t which_motors) +{ + delay(50); // this delay is required for the status byte to be available for reading. + while (!isTimeDone(which_motors)) delay(50); +} + +// True when a command based on using the motor encoder completes +bool EVs_NXTMMX::isTachoDone(uint8_t which_motors) +{ + if (which_motors == MMX_Motor_Both) + { + return isTachoDone(MMX_Motor_1) && isTachoDone(MMX_Motor_2); + } + uint8_t status = getMotorStatusByte(which_motors); + return (status & MMX_CONTROL_TACHO) == 0; +} + +// waited until a turn-by-degrees command ends +void EVs_NXTMMX::waitUntilTachoDone(uint8_t which_motors) +{ + delay(50); // this delay is required for the status byte to be available for reading. + while (!isTachoDone(which_motors)) delay(50); +} + + +// Utility functions for motor control + +// Take a speed and direction and give just a speed +inline int calcFinalSpeed(int initialSpeed, uint8_t direction) +{ + if (direction == MMX_Direction_Forward) + return initialSpeed; + return -initialSpeed; +} + +// Calculate the bits that control what happens when this action finishes +inline uint8_t calcNextActionBits(uint8_t next_action) +{ + if (next_action == MMX_Next_Action_Brake) + return MMX_CONTROL_BRK; + else if (next_action == MMX_Next_Action_BrakeHold) + return MMX_CONTROL_BRK | MMX_CONTROL_ON; +} + +void EVs_NXTMMX::runUnlimited( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + uint8_t direction, // MMX_Direction_ Forward or Reverse + int speed) // in range [-100, +100] +{ + uint8_t ctrl = MMX_CONTROL_SPEED | MMX_CONTROL_GO; + int sp = calcFinalSpeed(speed, direction); + setSpeedTimeAndControl(which_motors, sp, 0, ctrl); +} + +// runs the motors for a given number of seconds +void EVs_NXTMMX::runSeconds( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + uint8_t direction, // MMX_Direction_ Forward or Reverse + int speed, // [-100, +100] + uint8_t duration, // in seconds + uint8_t wait_for_completion, // MMX_Completion_ Wait_For or Dont_Wait + uint8_t next_action) // MMX_Next_Action_ Brake, BrakeHold or Float +{ + uint8_t ctrl = MMX_CONTROL_SPEED | MMX_CONTROL_TIME | MMX_CONTROL_GO; + ctrl |= calcNextActionBits(next_action); + int sp = calcFinalSpeed(speed, direction); + setSpeedTimeAndControl(which_motors, sp, duration, ctrl); + + if (wait_for_completion == MMX_Completion_Wait_For) + { + waitUntilTimeDone(which_motors); + } +} + +// runs the motors until the tachometer reaches a certain position +void EVs_NXTMMX::runTachometer( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + uint8_t direction, // MMX_Direction_ Forward or Reverse + int speed, // [-100, +100] + long tachometer, // in degrees + uint8_t relative, // MMX_Move_ Relative or Absolute + uint8_t wait_for_completion, // MMX_Completion_ Wait_For or Dont_Wait + uint8_t next_action) // MMX_Next_Action_ Brake, BrakeHold or Float +{ + uint8_t ctrl = MMX_CONTROL_SPEED | MMX_CONTROL_TACHO | MMX_CONTROL_GO; + ctrl |= calcNextActionBits(next_action); + int final_speed = calcFinalSpeed(speed, direction); + + // The tachometer can be absolute or relative. + // If it is absolute, we ignore the direction parameter. + long final_tach = tachometer; + + if (relative == MMX_Move_Relative) + { + ctrl |= MMX_CONTROL_RELATIVE; + + // a (relative) forward command is always a positive tachometer reading + final_tach = abs(tachometer); + if (final_speed < 0) + { + // and a (relative) reverse command is always negative + final_tach = -final_tach; + } + } + + setEncoderSpeedTimeAndControl(which_motors, final_tach, final_speed, 0, ctrl); + + if (wait_for_completion == MMX_Completion_Wait_For) + { + waitUntilTachoDone(which_motors); + } +} + +// Turns the motors the specified number of degrees +void EVs_NXTMMX::runDegrees( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + uint8_t direction, // MMX_Direction_ Forward or Reverse + int speed, // [-100, +100] + long degrees, // in degrees + uint8_t wait_for_completion, // MMX_Completion_ Wait_For or Dont_Wait + uint8_t next_action) // MMX_Next_Action_ Brake, BrakeHold or Float +{ + runTachometer(which_motors, direction, speed, degrees, + MMX_Move_Relative, wait_for_completion, next_action); +} + +// runs the motor(s) the specified number of rotations +void EVs_NXTMMX::runRotations( + uint8_t which_motors, // MMX_Motor_ 1, 2, or Both + uint8_t direction, // MMX_Direction_ Forward or Reverse + int speed, // [-100, +100] + long rotations, // number of full rotations of the motor + uint8_t wait_for_completion, // MMX_Completion_ Wait_For or Dont_Wait + uint8_t next_action) // MMX_Next_Action_ Brake, BrakeHold or Float +{ + runTachometer(which_motors, direction, speed, 360 * rotations, + MMX_Move_Relative, wait_for_completion, next_action); +} + +// The stop command will only stop the motor(s) by making them float/coast +// or brake. Even if you specify MMX_Next_Action_BrakeHold, the motor +// will only brake, not hold. +bool EVs_NXTMMX::stop(uint8_t which_motors, uint8_t next_action) +{ + if (which_motors >= MMX_Motor_1 && which_motors <= MMX_Motor_Both) + { + // The magic variables become clear in the user's guide + uint8_t base_code = (next_action != MMX_Next_Action_Float) ? 'A' - 1 : 'a' - 1; + + return issueCommand(base_code + which_motors); + } + + setWriteErrorCode(5); // bad parameters + return false; +} diff --git a/EVs_NXTMMX.h b/EVs_NXTMMX.h new file mode 100644 index 0000000..8966422 --- /dev/null +++ b/EVs_NXTMMX.h @@ -0,0 +1,221 @@ + +// EVs_NXTMMX.h +// +// This is a class for controlling the Lego Motor Multiplexer, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=134 . + +// Initial version: 2010-06-07 by Clinton Blackmore +// Large ports of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTMMX_H +#define EVs_NXTMMX_H + +// THE FOLLOWING CONSTANTS ARE ALL FROM THE NXC SOURCE CODE + +#define MMX_CONTROL_SPEED 0x01 +#define MMX_CONTROL_RAMP 0x02 +#define MMX_CONTROL_RELATIVE 0x04 +#define MMX_CONTROL_TACHO 0x08 +#define MMX_CONTROL_BRK 0x10 +#define MMX_CONTROL_ON 0x20 +#define MMX_CONTROL_TIME 0x40 +#define MMX_CONTROL_GO 0x80 + +#define MMX_COMMAND 0x41 +#define MMX_VOLTAGE 0x41 + +#define MMX_SETPT_M1 0x42 +#define MMX_SPEED_M1 0x46 +#define MMX_TIME_M1 0x47 +#define MMX_CMD_B_M1 0x48 +#define MMX_CMD_A_M1 0x49 + +#define MMX_SETPT_M2 0x4A +#define MMX_SPEED_M2 0x4E +#define MMX_TIME_M2 0x4F +#define MMX_CMD_B_M2 0x50 +#define MMX_CMD_A_M2 0x51 + +/* + * Read registers. + */ +#define MMX_POSITION_M1 0x62 +#define MMX_POSITION_M2 0x66 +#define MMX_STATUS_M1 0x72 +#define MMX_STATUS_M2 0x73 +#define MMX_TASKS_M1 0x76 +#define MMX_TASKS_M2 0x77 + +#define MMX_ENCODER_PID 0x7A +#define MMX_SPEED_PID 0x80 +#define MMX_PASS_COUNT 0x86 +#define MMX_TOLERANCE 0x87 + +/* constants to be used by user programs */ +/* + * Motor selection related constants + */ +#define MMX_Motor_1 0x01 +#define MMX_Motor_2 0x02 +#define MMX_Motor_Both 0x03 + +/* + * Next action related constants + */ +// stop and let the motor coast. +#define MMX_Next_Action_Float 0x00 +// apply brakes, and resist change to tachometer +#define MMX_Next_Action_Brake 0x01 +// apply brakes, and restore externally forced change to tachometer +#define MMX_Next_Action_BrakeHold 0x02 + +/* + * Direction related constants + */ +#define MMX_Direction_Forward 0x01 +#define MMX_Direction_Reverse 0x00 + +/* + * Tachometer related constants + */ +#define MMX_Move_Relative 0x01 +#define MMX_Move_Absolute 0x00 + +#define MMX_Completion_Wait_For 0x01 +#define MMX_Completion_Dont_Wait 0x00 + +/* + * Speed constants, these are just convenience constants, + * You can use any value between 0 and 100. + */ +#define MMX_Speed_Full 90 +#define MMX_Speed_Medium 60 +#define MMX_Speed_Slow 25 + + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with NXTMMX attached to EVShield + */ +class EVs_NXTMMX : public EVShieldI2C +{ +public: + /** constructor for NXTMMX + */ + EVs_NXTMMX(uint8_t i2c_address = 0x06); + + /** get the battery voltage for the MMX */ + uint8_t getBatteryVoltage(); + + /** issue a command to this bank of the NXTMMX */ + uint8_t issueCommand(char command); + + /** set the target encoder position for the motor */ + bool setEncoderTarget(uint8_t which_motor, long target); + + /** get the target encoder position for the motor */ + long getEncoderTarget(uint8_t which_motor); + + /** set the speed of the motor */ + bool setSpeed(uint8_t which_motor, int speed); + + /** get the speed of the motor */ + int8_t getSpeed(uint8_t which_motor); + + /** set the time in seconds for which the motor should run for */ + bool getTimeToRun(uint8_t which_motor, int seconds); + + /** get the time in seconds that the motor is running for */ + uint8_t getTimeToRun(uint8_t which_motor); + + bool setCommandRegB(uint8_t which_motor, uint8_t value); + uint8_t getCommandRegB(uint8_t which_motor); + bool setCommandRegA(uint8_t which_motor, uint8_t value); + uint8_t getCommandRegA(uint8_t which_motor); + + /** get the current encoder position of the motor in degrees */ + int32_t getEncoderPosition(uint8_t which_motor); + + /** get the current status of the motor */ + uint8_t getMotorStatusByte(uint8_t which_motor); + + /** get the tasks that are running on the specific motor */ + uint8_t getMotorTasksRunningByte(uint8_t which_motor); + + /** set the PID control for the encoders */ + bool setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd); + + /** set the PID control for the speed of the motors */ + bool setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd); + + /** set how many times the PID controller is allowed to oscillate about the set point */ + bool setPassCount(uint8_t pass_count); + + /** set how far away from the set point the PID controller is allowed to oscillate (amplitude) */ + bool setTolerance(uint8_t tolerance); + + /** reset all the set values for the motors */ + bool reset(); + + /** start both motors at the same time to follow the set conditions */ + bool startMotorsInSync(); + + /** reset the current encoder position to zero for the motor */ + bool resetEncoder(uint8_t which_motor); + + /** set the speed, duration to run, and control for the motor */ + bool setSpeedTimeAndControl(uint8_t which_motors, int speed, uint8_t duration, uint8_t control); + + /** set the ratget encoder position, speed, duration to run, and control for the motor */ + bool setEncoderSpeedTimeAndControl(uint8_t which_motors, long encoder, int speed, uint8_t duration, uint8_t control); + + /** validate if the motor has finished running for the set time duration */ + bool isTimeDone(uint8_t which_motors); + + /** wait until the motor has finished running for its set respective time duration */ + void waitUntilTimeDone(uint8_t which_motors); + + /** validate if the motor has reached its set target tachometer position */ + bool isTachoDone(uint8_t which_motors); + + /** wait until the motor has reached its set target tachometer position */ + void waitUntilTachoDone(uint8_t which_motors); + + /** run the motor endlessly at the desired speed in the desired direction */ + void runUnlimited(uint8_t which_motors, uint8_t direction, int speed); + + /** run the motor for a set duration at a set speed and do the next action */ + void runSeconds(uint8_t which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action); + + /** run until the tachometer target has been reached and do next action */ + void runTachometer(uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action); + + /** run the motor for a set number of degrees and proceed to the next action */ + void runDegrees(uint8_t which_motors, uint8_t direction,int speed, long degrees, uint8_t wait_for_completion, uint8_t next_action); + + /** run the motor for a set number of complete rotations and proceed to the next action */ + void runRotations( uint8_t which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action); + + /** stop the motor and do an action */ + bool stop(uint8_t which_motors, uint8_t next_action); +}; + +#endif diff --git a/EVs_NXTServo.cpp b/EVs_NXTServo.cpp new file mode 100644 index 0000000..b6a096b --- /dev/null +++ b/EVs_NXTServo.cpp @@ -0,0 +1,134 @@ + +// EVs_NXTServo.cpp +// +// This is a class for controlling the NXT Servo Controller, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=93 . + +// Initial version: 2010-06-17 by Andrew Sylvester. +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_NXTServo.h" + + + +EVs_NXTServo::EVs_NXTServo(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} + +uint8_t EVs_NXTServo::getBatteryVoltage() +{ + return readByte(Servo_Voltage); +} + +uint8_t EVs_NXTServo::issueCommand(char command) +{ + return writeByte(Servo_Command, (uint8_t)command); +} + +bool EVs_NXTServo::storeInitial() +{ + return issueCommand('In'); +} +bool EVs_NXTServo::reset() +{ + return issueCommand('S'); +} +bool EVs_NXTServo::haltMacro() +{ + return issueCommand('H'); +} + +bool EVs_NXTServo::resumeMacro() +{ + return issueCommand('R'); +} + +bool EVs_NXTServo::gotoEEPROM() +{ + return issueCommand('Gx'); +} + +bool EVs_NXTServo::editMacro() +{ + return issueCommand('Em'); +} + +bool EVs_NXTServo::pauseMacro() +{ + return issueCommand('P'); +} +bool EVs_NXTServo::setSpeed(uint8_t number, uint8_t speed) +{ + return writeByte((uint8_t) number, (uint8_t)speed); +} + +bool EVs_NXTServo::setPosition(uint8_t number, uint8_t position) +{ + return writeByte((uint8_t) number, (uint8_t) position); +} + +void EVs_NXTServo::runServo(uint8_t number, // Servo_1, 2, 3, ..., 8 + uint8_t position, // [500,2500] Servo_Default + uint8_t speed) // [0, inf] or Speed_Full +{ + if (number == Servo_1) + { + setPosition(Servo_Position_1, position); + setSpeed(Servo_Speed_1, speed); + } + else if (number == Servo_2) + { + setPosition(Servo_Position_2, position); + setSpeed(Servo_Speed_2, speed); + } + else if (number == Servo_3) + { + setPosition(Servo_Position_3, position); + setSpeed(Servo_Speed_3, speed); + } + else if (number == Servo_4) + { + setPosition(Servo_Position_4, position); + setSpeed(Servo_Speed_4, speed); + } + else if (number == Servo_5) + { + setPosition(Servo_Position_5, position); + setSpeed(Servo_Speed_5, speed); + } + else if (number == Servo_6) + { + setPosition(Servo_Position_6, position); + setSpeed(Servo_Speed_6, speed); + } + else if (number == Servo_7) + { + setPosition(Servo_Position_7, position); + setSpeed(Servo_Speed_7, speed); + } + else if (number == Servo_8) + { + setPosition(Servo_Position_8, position); + setSpeed(Servo_Speed_8, speed); + } +} diff --git a/EVs_NXTServo.h b/EVs_NXTServo.h new file mode 100644 index 0000000..dba94f0 --- /dev/null +++ b/EVs_NXTServo.h @@ -0,0 +1,113 @@ + +// EVs_NXTServo.h +// +// This is a class for controlling the NXT Servo Controller, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=93 . + +// Initial version: 2010-06-17 by Andrew Sylvester. +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTServo_H +#define EVs_NXTServo_H + +#define Servo_Command 0x41 +#define Servo_Voltage 0x41 + +#define Servo_1 1 +#define Servo_2 2 +#define Servo_3 3 +#define Servo_4 4 +#define Servo_5 5 +#define Servo_6 6 +#define Servo_7 7 +#define Servo_8 8 + +#define Servo_Position_Default 1500 +#define Servo_Speed_Full 0 + +#define Servo_Position_1 0x5A +#define Servo_Position_2 0x5B +#define Servo_Position_3 0x5C +#define Servo_Position_4 0x5D +#define Servo_Position_5 0x5E +#define Servo_Position_6 0x5F +#define Servo_Position_7 0x60 +#define Servo_Position_8 0x61 + +#define Servo_Speed_1 0x52 +#define Servo_Speed_2 0x53 +#define Servo_Speed_3 0x54 +#define Servo_Speed_4 0x55 +#define Servo_Speed_5 0x56 +#define Servo_Speed_6 0x57 +#define Servo_Speed_7 0x58 +#define Servo_Speed_8 0x59 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with NXTServo attached to EVShield + */ +class EVs_NXTServo : public EVShieldI2C +{ +public: + /** class constructor for the NXTServo with optional custom i2c address parameter */ + EVs_NXTServo(uint8_t i2c_address = 0xb0); + + /** issue a character command byte to the command register of the NXTServo */ + uint8_t issueCommand(char command); + + /** get the battery voltage supplied to the NXTServo */ + uint8_t getBatteryVoltage(); + + /** store current settings of servos to initial default setting and remember when powered on */ + bool storeInitial(); + + /** reset all servos to default */ + bool reset(); + + /** stop the onboard macro on the NXTServo */ + bool haltMacro(); + + /** resume the onboard macro on the NXTServo */ + bool resumeMacro(); + + /** reinitialize the macro enviornment */ + bool gotoEEPROM(); + + /** edit the onboard macro */ + bool editMacro(); + + /** temporarily pause the running macro */ + bool pauseMacro(); + + /** set the speed of a specified servo */ + bool setSpeed(uint8_t number, uint8_t speed); + + /** set the position of a specified servo */ + bool setPosition(uint8_t number, uint8_t position); + + /** run the specified to the specified position at the specified speed */ + void runServo(uint8_t number, uint8_t position, uint8_t speed); + +}; + +#endif diff --git a/EVs_NXTTouch.cpp b/EVs_NXTTouch.cpp new file mode 100644 index 0000000..55216d3 --- /dev/null +++ b/EVs_NXTTouch.cpp @@ -0,0 +1,37 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTTouch.h" + +bool EVs_NXTTouch::init(EVShield * shield, SH_BankPort bp) +{ + EVShieldAGS::init(shield, bp); + EVShieldAGS::setType(SH_Type_ANALOG); +} + +bool EVs_NXTTouch::isPressed() +{ + int a; + a = readRaw(); + + if ( a < 300 ) return true; + else return false; +} diff --git a/EVs_NXTTouch.h b/EVs_NXTTouch.h new file mode 100644 index 0000000..1ef6383 --- /dev/null +++ b/EVs_NXTTouch.h @@ -0,0 +1,39 @@ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTTOUCH_H +#define EVs_NXTTOUCH_H + +#include "EVShieldAGS.h" + +/** + @brief This class interfaces with LEGO NXT Touch sensor attached to EVShield + */ +class EVs_NXTTouch : public EVShieldAGS +{ +public: + /** check if the touch sensor is pressed */ + bool init(EVShield * shield, SH_BankPort bp); + bool isPressed(); +}; + +#endif + diff --git a/EVs_NXTVoltMeter.cpp b/EVs_NXTVoltMeter.cpp new file mode 100644 index 0000000..c4e030c --- /dev/null +++ b/EVs_NXTVoltMeter.cpp @@ -0,0 +1,58 @@ +//EVs_NXTVoltMeter.cpp +// +// This is a class controlling the NXTVoltMeter, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=162 + +// Initial version: 2013-01-24 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_NXTVoltMeter.h" + +EVs_VoltMeter::EVs_VoltMeter(uint8_t i2c_address) + : EVShieldI2C(i2c_address) +{ + +} + +uint8_t EVs_VoltMeter::issueCommand(char command) +{ + return writeByte(VM_Command, (uint8_t) command); +} + +int EVs_VoltMeter::getAVoltage() +{ + return readInteger(ABSOLUTE_V); +} + +int EVs_VoltMeter::getRVoltage() +{ + return readInteger(RELATIVE_V); +} + +int EVs_VoltMeter::getReference() +{ + return readInteger(REFERENCE_V); +} + +int EVs_VoltMeter::setReferenceV() +{ + return issueCommand('d'); +} + diff --git a/EVs_NXTVoltMeter.h b/EVs_NXTVoltMeter.h new file mode 100644 index 0000000..93386ce --- /dev/null +++ b/EVs_NXTVoltMeter.h @@ -0,0 +1,60 @@ +//EVs_NXTVoltMeter.h +// +// This is a class for reading from NXTVoltMeter, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=162 + +// Initial version: 2013-01-24 by Michael Giles +// Modified for EVShield: 2015-2-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef EVs_NXTVoltMeter_H +#define EVs_NXTVoltMeter_H + +#define VM_Command 0x41 + +#define ABSOLUTE_V 0X43 +#define RELATIVE_V 0x45 + +#define REFERENCE_V 0X47 + +#include "EVShieldI2C.h" + /** @brief This class + * interfaces with sensor attached to EVShield */ +class EVs_VoltMeter : public EVShieldI2C +{ +public: + /** Constructor for the class; may supply an optional custom i2c address */ + EVs_VoltMeter(uint8_t i2c_address = 0x26); + /** Write a command byte at the command register of the device */ + uint8_t issueCommand(char command); + /** Get the Absolute Voltage + * @return Absolute Voltage value*/ + int getAVoltage(); + /** Get the Relative Voltage + * @return Relative Voltage value*/ + int getRVoltage(); + /** Get the Reference Voltage + * @return Reference Voltage value*/ + int getReference(); + /** Set the Reference Voltage to current Absolute Voltage */ + int setReferenceV(); + +}; + +#endif diff --git a/EVs_NumericPad.cpp b/EVs_NumericPad.cpp new file mode 100644 index 0000000..70c3c83 --- /dev/null +++ b/EVs_NumericPad.cpp @@ -0,0 +1,127 @@ +// EVs_NumericPad.cpp +// +// This is a class for reading from NumericPad, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=138 + +// Initial version: 2011-07-19 by Michael Giles +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_NumericPad.h" +/* +byte Group1[] = {0x5C, 0x0B, 0x20}; +byte Group2[] = {0x2B, 1, 1, 0, 0, 1, 1, 0xFF, 2}; +byte Group3[] = {0x41, 15, 10, 15, 10, 15, 10, 15, 10, 15, 10, 15, 10, 15, 10, 15}; +byte Group4[] = {0x50, 10, 15, 10, 15, 10, 15, 10, 15, 10, 15, 10}; +byte Group5[] = {0x7D, 156, 101, 140, 0x0C}; +*/ +byte Group1[] = {0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0xFF, 0x02}; +byte Group2[] = {0x0F, 0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F}; +byte Group3[] = {0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F}; +byte Group4[] = {0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F, 0x0A, 0x0F}; +byte Group5[] = {0x0b, 0x20, 0x0C}; +byte Group6[] = {0x9C, 0x65, 0x8C}; +byte waitPeriod = 1; +byte Group7[] = {0x0B}; + +char keyMap[] = { '4', '1', '7', '*', '5', '2', '8', '0', '3', '6', '9', '#' }; + +uint8_t KEY_STATUS_REG = 0x00; + +EVs_NumericPad::EVs_NumericPad(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} + +void EVs_NumericPad::InitializeKeypad() +{ +// the following sequence of bytes initialize the sensor's +// configuration for performance. + +// This function must be called at the beginning of every power cycle +// (call it at the beginning of your program, after you initialize the port). + +// Do not change the values below +// Or the order in which these values are written. + writeRegisters(0x41, 9, Group2); + writeRegisters(0x4A, 8, Group3); + writeRegisters(0x52, 8, Group4); + writeRegisters(0x5C, 3, Group5); + writeRegisters(0X2B, 8, Group1); + writeRegisters(0x7B, 1, Group7); + writeRegisters(0x7D, 3, Group6); + +} + + + +bool EVs_NumericPad::GetKeyPress(int waitPeriod/* seconds */, byte &keyHolder) +{ + uint8_t *regValue; + int Touch; + int Previous_Touch; + int bit_test; + int i, j; + int w, cw; + w = waitPeriod * 1000; + + cw = 0; // cumulative wait + while(true) + { + + Touch = readInteger(KEY_STATUS_REG); + int b; + b = 0x01 << 11; + + if(Previous_Touch != Touch) + { + Previous_Touch = Touch; + + for ( j=0, i=0; j < 12; j++) + { + if ( Touch & b ) { + keyHolder = keyMap[j]; + return true; + } + b = b >> 1; + } + } + delay(150); + cw += 150; + if ( w != 0 && cw > w ) { + return false; + } + } + return false; +} + +int EVs_NumericPad::GetKeysPressed () +{ //Returns a 12bit number containing the status of all 12 keys. + uint8_t buf[4]; + int result; + result = readInteger(KEY_STATUS_REG); + return result; +} + + + + + diff --git a/EVs_NumericPad.h b/EVs_NumericPad.h new file mode 100644 index 0000000..ef75ce5 --- /dev/null +++ b/EVs_NumericPad.h @@ -0,0 +1,64 @@ +// EVs_NumericPad.h +// +// This is a class for reading from NumericPad, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=138 + +// Initial version: 2011-07-19 by Michael Giles +// Modified for EVShield: 2015-02-16 Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_NumericPad_H +#define EVs_NumericPad_H + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with NumericPad attached to EVShield + */ +class EVs_NumericPad : public EVShieldI2C +{ +public: + /** class constructor for the NumericPad with an optional custom i2c address parameter */ + EVs_NumericPad(uint8_t i2c_address = 0xB4); + + /** Initialize the keypad for communication with host. + This function also sets up the capacitance values for + the keypad with appropriate sensitiviy */ + void InitializeKeypad(); + + /** Get the key pressed on the keypad. + @param waitPeriod how long to wait for user to press key (seconds). + @param keyHolder return value of the key user pressed in that time. + @return true if there was a key pressed in specified time. + @return false if no key pressed in the specified time. + */ + bool GetKeyPress(int waitPeriod/* seconds */, byte &keyHolder); + + /** Get all the keys pressed by the user at the present moment + function returns: + integer value of all keys, each bit that is set to 1 represents a key that is pressed. + the bits are set as per keyMap. Only 12 bits can be 1. + */ + int GetKeysPressed(); + +}; + +#endif /* EVs_NumericPad_H_ */ diff --git a/EVs_PFMate.cpp b/EVs_PFMate.cpp new file mode 100644 index 0000000..e8eba0a --- /dev/null +++ b/EVs_PFMate.cpp @@ -0,0 +1,105 @@ + +// EVs_PFMate.cpp +// +// This is a class for controlling the PF Motor Controller, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=107 . + +// Initial version: 2010-06-17 by Andrew Sylvester +// Modified for EVShield: 2015-02-17 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_PFMate.h" + + + +EVs_PFMate::EVs_PFMate(uint8_t i2c_address) +: EVShieldI2C(i2c_address) +{ +} +uint8_t EVs_PFMate::issueCommand(char command) +{ + return writeByte(PF_Commmand, (uint8_t)command); +} + +bool EVs_PFMate::sendSignal() +{ + return issueCommand('G'); +} + +bool EVs_PFMate::setChannel(uint8_t channel) +{ + return writeByte(PF_Channel, (uint8_t)channel); +} + +bool EVs_PFMate::setControl(uint8_t control) +{ + return writeByte(PF_Control, (uint8_t)control); +} + +bool EVs_PFMate::setOperationA(uint8_t operation) +{ + return writeByte(PF_Operation_A, (uint8_t)operation); +} + +bool EVs_PFMate::setOperationB(uint8_t operation) +{ + return writeByte(PF_Operation_B, (uint8_t)operation); +} + +bool EVs_PFMate::setSpeedA(uint8_t speed) +{ + return writeByte(PF_Speed_A, (uint8_t)speed); +} + +bool EVs_PFMate::setSpeedB(uint8_t speed) +{ + return writeByte(PF_Speed_B, (uint8_t)speed); +} + +void EVs_PFMate::controlMotor( + uint8_t channel, // PF_Channel_1, 2, 3, or 4 + uint8_t control, // PF_Contol_Both, A, or B + uint8_t operation, // PF_Operation_Forward, Reverse, Float, or Brake + uint8_t speed) // [1, 7] or PF_Speed_Full, Medium, or Slow + +{ + if (control == PF_Contol_Both) + { + setOperationA(operation); + setSpeedA(speed); + setOperationB(operation); + setSpeedB(speed); + } + + else if (control == PF_Contol_A) + { + setOperationA(operation); + setSpeedA(speed); + } + + else if (control == PF_Contol_B) + { + setOperationB(operation); + setSpeedB(speed); + + } +} + diff --git a/EVs_PFMate.h b/EVs_PFMate.h new file mode 100644 index 0000000..c41cc35 --- /dev/null +++ b/EVs_PFMate.h @@ -0,0 +1,97 @@ + +// EVs_PFMate.h +// +// This is a class for controlling the PF Motor Controller, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=107 . + +// Initial version: 2010-06-17 by Andrew Sylvester +// Modified for EVShield: 2015-02-17 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_PFMate_H +#define EVs_PFMate_H + +#define PF_Commmand 0x41 + +#define PF_Channel 0x42 +#define PF_Channel_1 1 +#define PF_Channel_2 2 +#define PF_Channel_3 3 +#define PF_Channel_4 4 + +#define PF_Control 0x43 +#define PF_Contol_Both 0 +#define PF_Contol_A 1 +#define PF_Contol_B 2 + +#define PF_Speed_A 0x45 +#define PF_Speed_B 0x47 +#define PF_Speed_Slow 1 +#define PF_Speed_Medium 4 +#define PF_Speed_Full 7 + +#define PF_Operation_A 0x44 +#define PF_Operation_B 0x46 +#define PF_Operation_Float 0 +#define PF_Operation_Forward 1 +#define PF_Operation_Reverse 2 +#define PF_Operation_Brake 3 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with PFMate attached to EVShield + */ +class EVs_PFMate : public EVShieldI2C +{ +public: + /** class constructor for PFMate with optional custom i2c address as a parameter */ + EVs_PFMate(uint8_t i2c_address = 0x48); + + /** issue char command byte to the command register of the PFMate */ + uint8_t issueCommand(char command); + + /** send the data to the PF receiver */ + bool sendSignal(); + + /** control the PF motors on the channel the receiver is set to, which motors to control, the operation for the motors, and the speed to run them */ + void controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed); + + /** set which channel the PF receiver is on so the PFMate can talk with it */ + bool setChannel(uint8_t channel); + + /** set which motor to control */ + bool setControl(uint8_t contol); + + /** set the operation of motor A */ + bool setOperationA(uint8_t operation); + + /** set the operation of motor B */ + bool setOperationB(uint8_t operation); + + /** set the speed of motor A */ + bool setSpeedA(uint8_t speed); + + /** set the speed of motor B */ + bool setSpeedB(uint8_t speed); +}; + +#endif diff --git a/EVs_PSPNx.cpp b/EVs_PSPNx.cpp new file mode 100644 index 0000000..30fd50c --- /dev/null +++ b/EVs_PSPNx.cpp @@ -0,0 +1,103 @@ + +// EVs_PSPNx.cpp +// +// This is a class for reading from PSP-Nx, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=61 + +// Initial version: 2010-06-15 by Andrew Sylvester +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "EVs_PSPNx.h" + + +EVs_PSPNx::EVs_PSPNx(uint8_t i2c_address) + : EVShieldI2C(i2c_address) +{ +} + +uint8_t EVs_PSPNx::issueCommand(char command) +{ + return writeByte(PSPNx_Command, (uint8_t)command); +} + +bool EVs_PSPNx::energize() +{ + return issueCommand('R'); +} + +bool EVs_PSPNx::deEnergize() +{ + return issueCommand('S'); +} + +bool EVs_PSPNx::setDigitalMode() +{ + return issueCommand('A'); +} + +bool EVs_PSPNx::setAnalogMode() +{ + return issueCommand('s'); +} + +int8_t EVs_PSPNx::getXLJoy() +{ + int16_t a; + int8_t b; + a = readByte(PSPNx_XLeftJoystick); + b = (((a - 128)*25) >> 5) & 0xFF; + return b; +} +int8_t EVs_PSPNx::getYLJoy() +{ + int16_t a; + int8_t b; + a= readByte(PSPNx_YLeftJoystick); + b = (((a - 128)*25) >> 5) & 0xFF; + return b; +} +int8_t EVs_PSPNx::getXRJoy() +{ + int16_t a; + int8_t b; + a = readByte(PSPNx_XRightJoystick); + b = (((a - 128)*25) >> 5) & 0xFF; + return b; +} +int8_t EVs_PSPNx::getYRJoy() +{ + int16_t a; + int8_t b; + a = readByte(PSPNx_YRightJoystick); + b = (((a - 128)*25) >> 5) & 0xFF; + return b; +} + +void EVs_PSPNx::getButtons(int8_t *buttons1, int8_t *buttons2) +{ + int8_t buf1, buf2; + buf1 = readByte(PSPNx_ButtonSet1); + buf2 = readByte(PSPNx_ButtonSet2); + for (int i = 0; i < 8; i++) { + buttons1[i] = buf1 >> i & 0x01; + buttons2[i] = buf2 >> i & 0x01; + } +} diff --git a/EVs_PSPNx.h b/EVs_PSPNx.h new file mode 100644 index 0000000..c658bce --- /dev/null +++ b/EVs_PSPNx.h @@ -0,0 +1,109 @@ + +// EVs_PSPNx.h +// +// This is a class for reading from PSP-Nx, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=61 + +// Initial version: 2010-06-15 by Andrew Sylvester +// Modified for EVShield: 2015-02-17 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_PSPNx_H +#define EVs_PSPNx_H + +#define PSPNx_Command 0x41 +#define PSPNx_ButtonSet1 0x42 +#define PSPNx_ButtonSet2 0x43 +#define PSPNx_XLeftJoystick 0x44 +#define PSPNx_YLeftJoystick 0x45 +#define PSPNx_XRightJoystick 0x46 +#define PSPNx_YRightJoystick 0x47 + +#define BS2_Button_L2 0 +#define BS2_Button_R2 1 +#define BS2_Button_L1 2 +#define BS2_Button_R1 3 +#define BS2_Button_Triangle 4 +#define BS2_Button_Circle 5 +#define BS2_Button_Cross 6 +#define BS2_Button_Square 7 + +#define BS1_Button_Select 0 +#define BS1_Button_L3 1 +#define BS1_Button_R3 2 +#define BS1_Button_Start 3 +#define BS1_Button_Up 4 +#define BS1_Button_Right 5 +#define BS1_Button_Down 6 +#define BS1_Button_Left 7 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with PSP-Nx attached to EVShield + */ +class EVs_PSPNx : public EVShieldI2C +{ +public: + /** class constructor for the EVs_PSPNx class with an optional custom i2c address parameter */ + EVs_PSPNx(uint8_t i2c_address = 0x02); + + /** issue a character command byte to the command register of the PSPNx */ + uint8_t issueCommand(char command); + + /** power on the joystick receiver */ + bool energize(); + + /** power off the joystick receiver */ + bool deEnergize(); + + /** set the mode of the joystick to digital */ + bool setDigitalMode(); + + /** set the mode of the joystick to analog */ + bool setAnalogMode(); + + /** get the x-coordinate of the left joystick, + @return number between -100 and +100 and zero when the joystick is neutral. + */ + int8_t getXLJoy(); + + /** get the y-coordinate of the left joystick + @return number between -100 and +100 and zero when the joystick is neutral. + */ + int8_t getYLJoy(); + + /** get the x-coordinate of the right joystick + @return number between -100 and +100 and zero when the joystick is neutral. + */ + int8_t getXRJoy(); + + /** get the y-coordinate of the right joystick + @return number between -100 and +100 and zero when the joystick is neutral. + */ + int8_t getYRJoy(); + + /** get the current button status of button set 1 and button set 2 */ + void getButtons(int8_t *buttons1, int8_t *buttons2); + +}; + +#endif diff --git a/EVs_PiLight.cpp b/EVs_PiLight.cpp new file mode 100644 index 0000000..e675cd5 --- /dev/null +++ b/EVs_PiLight.cpp @@ -0,0 +1,62 @@ +// AbsoluteIMU.cpp +// +// This is a class for controlling the PiLight device amde by OpenElectrons.com +// See http://www.openelectrons.com/pages/19 + +// Initial version: 2014-03-17 by Michael Giles +// Large parts of the code is ported from the Raspberry Pi library for the device, +// written by Nitin Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_PiLight.h" + + +EVs_PiLight::EVs_PiLight(uint8_t i2c_address) + : EVShieldI2C(i2c_address) +{ + +} + +void EVs_PiLight::readPiLight(color &currcolor) +{ + char *b; + char str[200]; + b = readString(PILIGHT_RED, 3); + currcolor.r = readIntFromBuffer((uint8_t *)&b[0]); + currcolor.g = readIntFromBuffer((uint8_t *)&b[1]); + currcolor.b = readIntFromBuffer((uint8_t *)&b[2]); +} + +void EVs_PiLight::setTimeout1(uint8_t timeoutValue) +{ + uint8_t null = 0; + writeByteToBuffer(_buffer + 0, null); + writeByteToBuffer(_buffer + 1, null); + writeByteToBuffer(_buffer + 2, null); + writeByteToBuffer(_buffer + 3, timeoutValue); + writeRegisters(PILIGHT_RED, 4, _buffer); +} + +void EVs_PiLight::createPiLight(uint8_t red, uint8_t green, uint8_t blue) +{ + writeByteToBuffer(_buffer + 0, red); + writeByteToBuffer(_buffer + 1, green); + writeByteToBuffer(_buffer + 2, blue); + writeRegisters(PILIGHT_RED, 3, _buffer); +} + diff --git a/EVs_PiLight.h b/EVs_PiLight.h new file mode 100644 index 0000000..e490260 --- /dev/null +++ b/EVs_PiLight.h @@ -0,0 +1,77 @@ + +// PiLight.h +// +// This is a class for writing to PiLight, made by Openelectrons. +// See http://www.openelectrons.com/pages/19 + +// Initial version: 2014-03-17 by Michael Giles +// Large parts of the code is ported from the Raspberry Pi library for the device, +// written by Nitin Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_PILIGHT_H +#define EVs_PILIGHT_H + +#include "EVShieldI2C.h" + +// Color Registers. +#define PILIGHT_RED 0x42 +#define PILIGHT_GREEN 0x43 +#define PILIGHT_BLUE 0x44 + +/** + * \struct color + Color related data + */ +struct color +{ + byte r; /*!>4)&0x0F)*10); + return i; +} + +uint8_t EVs_RTC::getSeconds() +{ + return BCDToInteger(readByte(RTC_Seconds)); +} + +uint8_t EVs_RTC::getMinutes() +{ + return BCDToInteger(readByte(RTC_Minutes)); +} + +uint8_t EVs_RTC::getHours() +{ + return BCDToInteger(readByte(RTC_Hours)); +} + +uint8_t EVs_RTC::getDayWeek() +{ + return BCDToInteger(readByte(RTC_Day_of_Week)); +} + +uint8_t EVs_RTC::getDayMonth() +{ + return BCDToInteger(readByte(RTC_Day_of_Month)); +} + +uint8_t EVs_RTC::getMonth() +{ + return BCDToInteger(readByte(RTC_Month)); +} + +uint8_t EVs_RTC::getYear() +{ + return BCDToInteger(readByte(RTC_Year)); +} diff --git a/EVs_RTC.h b/EVs_RTC.h new file mode 100644 index 0000000..34cbd53 --- /dev/null +++ b/EVs_RTC.h @@ -0,0 +1,76 @@ + +// EVs_RTC.h +// This is a class for reading from Real-time Clock, made by Mindsensors. +// See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=101 + +// Initial version: 2010-06-10 by Andrew Sylvester +// Modified for EVShield: 2015-02-16 by Michael Giles +// Large parts of the code is ported from the NXC library for the device, +// written by Deepak Patil. + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_RTC_H +#define EVs_RTC_H + +#define RTC_Seconds 0x00 +#define RTC_Minutes 0x01 +#define RTC_Hours 0x02 +#define RTC_Day_of_Week 0x03 +#define RTC_Day_of_Month 0x04 +#define RTC_Month 0x05 +#define RTC_Year 0x06 + +#include "EVShieldI2C.h" + +/** + @brief This class interfaces with RTC attached to EVShield + */ +class EVs_RTC : public EVShieldI2C +{ +public: + /** class constructor of the RTC with an optional custom i2c address parameter */ + EVs_RTC(uint8_t i2c_address = 0xD0); + + /** get the current seconds reading of the clock (0-59) */ + uint8_t getSeconds(); + + /** get the current minutes reading of the clock (0-59) */ + uint8_t getMinutes(); + + /** get the current hours reading of the clock (1-24) */ + uint8_t getHours(); + + /** get the current day of the week reading of the clock (0-7 starting on Sunday) */ + uint8_t getDayWeek(); + + /** get the current day reading of the clock (1-31) */ + uint8_t getDayMonth(); + + /** get the current month of the year reading of the clock (1-12) */ + uint8_t getMonth(); + + /** get the current year reading of the clock */ + uint8_t getYear(); + +private: + uint8_t BCDToInteger(uint8_t b); + +}; + +#endif /* RTC_H_ */ diff --git a/EVs_SumoEyes.cpp b/EVs_SumoEyes.cpp new file mode 100644 index 0000000..147a64c --- /dev/null +++ b/EVs_SumoEyes.cpp @@ -0,0 +1,97 @@ + +/* + * EVShield interface library + * Copyright (C) 2011 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "EVs_SumoEyes.h" + +bool EVs_SumoEyes::init(EVShield * shield, SH_BankPort bp) +{ + EVShieldAGS::init(shield, bp); +} + + +bool EVs_SumoEyes::setType(int8_t type) +{ + if ( mp_shield == NULL) return false; + switch (m_bp) { + case SH_BAS1: + return mp_shield->bank_a.sensorSetType(SH_S1, type); + + case SH_BAS2: + return mp_shield->bank_a.sensorSetType(SH_S2, type); + + case SH_BBS1: + return mp_shield->bank_b.sensorSetType(SH_S1, type); + + case SH_BBS2: + return mp_shield->bank_b.sensorSetType(SH_S2, type); + + } +} + +bool EVs_SumoEyes::setShortRange() +{ + return setType( SH_Type_LIGHT_AMBIENT ); +} + +bool EVs_SumoEyes::setLongRange() +{ + return setType( SH_Type_LIGHT_REFLECTED ); +} + +bool EVs_SumoEyes::isNear(int reference, int delta, int comet) +{ + if ( (comet > (reference - delta)) + && (comet < (reference + delta)) ) { + return true; + } + return false; +} + +SE_Zone EVs_SumoEyes::detectObstacleZone() +{ + int se_value; + + se_value = readRaw(); + + if ( isNear(344, 10, se_value) ) return SE_Front; + if ( isNear(658, 10, se_value) ) return SE_Left; + if ( isNear(424, 10, se_value) ) return SE_Right; + + return (SE_None); +} + +char *EVs_SumoEyes::OBZoneToString(SE_Zone ob) +{ + switch (ob) { + case SE_None: + return "NONE"; + break; + case SE_Front: + return "FRONT"; + break; + case SE_Left: + return "LEFT"; + break; + case SE_Right: + return "RIGHT"; + break; + } +} diff --git a/EVs_SumoEyes.h b/EVs_SumoEyes.h new file mode 100644 index 0000000..b28d716 --- /dev/null +++ b/EVs_SumoEyes.h @@ -0,0 +1,66 @@ + +/* + * EVShield interface library + * Copyright (C) 2011 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#ifndef EVs_SUMOEYES_H +#define EVs_SUMOEYES_H + +#include "EVShieldAGS.h" + +typedef enum { + SE_None = 0, + SE_Front, + SE_Left, + SE_Right +} SE_Zone; + +/** + @brief This class interfaces with EVTSumoEyes sensor attached to EVShield + */ +class EVs_SumoEyes : public EVShieldAGS +{ +public: + /** initialize the SumoEyes with a pointer to the EVShield and the bankport it is connected to */ + bool init(EVShield * shield, SH_BankPort bp); + + /** set the analog type of the sensor */ + bool setType(int8_t type); + + /** set the analog mode of the sensor to get readings for long range */ + bool setLongRange(); + + /** set the analog mode of the sensor to get readings for short range */ + bool setShortRange(); + + /** detect the where the obstacle is */ + SE_Zone detectObstacleZone(); + + /** convert the detected zone to a readable string */ + char *OBZoneToString(SE_Zone ob); + +private: + bool isNear(int reference, int delta, int comet); + +}; + +#endif + + diff --git a/MsTimer2.cpp b/MsTimer2.cpp new file mode 100644 index 0000000..0a32701 --- /dev/null +++ b/MsTimer2.cpp @@ -0,0 +1,157 @@ +/* + MsTimer2.h - Using timer2 with 1ms resolution + Javier Valencia + + History: + 29/May/09 - V0.5 added support for Atmega1280 (thanks to Manuel Negri) + 19/Mar/09 - V0.4 added support for ATmega328P (thanks to Jerome Despatis) + 11/Jun/08 - V0.3 + changes to allow working with different CPU frequencies + added support for ATMega128 (using timer2) + compatible with ATMega48/88/168/8 + 10/May/08 - V0.2 added some security tests and volatile keywords + 9/May/08 - V0.1 released working on ATMEGA168 only + + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include + +unsigned long MsTimer2::msecs; +void (*MsTimer2::func)(); +volatile unsigned long MsTimer2::count; +volatile char MsTimer2::overflowing; +volatile unsigned int MsTimer2::tcnt2; + +void MsTimer2::set(unsigned long ms, void (*f)()) { + float prescaler = 0.0; + +#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || (__AVR_ATmega1280__) + TIMSK2 &= ~(1<= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 + TCCR2B |= (1< 16Mhz, prescaler set to 128 + TCCR2B |= ((1<= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 + TCCR2 |= (1< 16Mhz, prescaler set to 128 + TCCR2 |= ((1<= 1000000UL) && (F_CPU <= 16000000UL)) { // prescaler set to 64 + TCCR2 |= ((1< 16Mhz, prescaler set to 256 + TCCR2 |= (1<= msecs && !overflowing) { + overflowing = 1; + count = 0; + (*func)(); + overflowing = 0; + } +} + +ISR(TIMER2_OVF_vect) { +#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega48__) || defined (__AVR_ATmega88__) || defined (__AVR_ATmega328P__) || (__AVR_ATmega1280__) + TCNT2 = MsTimer2::tcnt2; +#elif defined (__AVR_ATmega128__) + TCNT2 = MsTimer2::tcnt2; +#elif defined (__AVR_ATmega8__) + TCNT2 = MsTimer2::tcnt2; +#endif + MsTimer2::_overflow(); +} + diff --git a/MsTimer2.h b/MsTimer2.h new file mode 100644 index 0000000..d9809fe --- /dev/null +++ b/MsTimer2.h @@ -0,0 +1,19 @@ +#ifndef MsTimer2_h +#define MsTimer2_h + +#include + +namespace MsTimer2 { + extern unsigned long msecs; + extern void (*func)(); + extern volatile unsigned long count; + extern volatile char overflowing; + extern volatile unsigned int tcnt2; + + void set(unsigned long ms, void (*f)()); + void start(); + void stop(); + void _overflow(); +} + +#endif diff --git a/SHDefines.h b/SHDefines.h new file mode 100644 index 0000000..dd3505d --- /dev/null +++ b/SHDefines.h @@ -0,0 +1,107 @@ +/** \file SHDefines.h +* SHDefines.h defines global definitions and constants used by EVShield library. +*/ + +/* + * EVShield interface library + * Copyright (C) 2015 mindsensors.com + * + * This file is part of EVShield interface library. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef SHDEFINES_H +#define SHDEFINES_H + +#if defined(__AVR__) + #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__) + #define MODEL_EVSHIELD_D + #else + #define MODEL_EVSHIELD_M + #endif + +#elif defined(__PIC32MX__) + + #if defined(_BOARD_UNO_) + #define MODEL_EVSHIELD_D + #elif defined(_BOARD_MEGA_) + #define MODEL_EVSHIELD_M + #endif + +#endif + + +/** + \enum SH_BankPort for the sensor bank ports +*/ +typedef enum { + SH_BAS1 = 0x01, /*!< Bank A Sensor Port 1 */ + SH_BAS2 = 0x02, /*!< Bank A Sensor Port 2 */ + SH_BBS1 = 0x03, /*!< Bank B Sensor Port 1 */ + SH_BBS2 = 0x04 /*!< Bank B Sensor Port 2 */ +} SH_BankPort; + +//! Protocols supported by EVShield. +/** + \enum SH_Protocols Protocol enums - to initialize your EVShield with appropriate protocol. +*/ +typedef enum { + SH_HardwareI2C = 0, /*!< It's best to use hardware i2c as it is faster, (but it does not work with Ultrasonic Sensor). */ + SH_SoftwareI2C, /*!< Software I2C is slower, and designed to work with Ultrasonic sensor. */ +} SH_Protocols; + +#if defined(MODEL_EVSHIELD_D) + // Arduino Duemilanove, Uno + #define SCL_BAS1 A5 + #define SDA_BAS1 A4 + #define SCL_BAS2 2 + #define SDA_BAS2 A0 + #define SCL_BBS1 4 + #define SDA_BBS1 A1 + #define SCL_BBS2 7 + #define SDA_BBS2 A2 + + // deepak + #define BTN_RIGHT 4 + #define BTN_LEFT 1 + // deepak end + + #define BTN_GO 2 + #define LED_RED 8 + #define LED_GREEN A3 + #define LED_BLUE 12 + +#else + // Arduino mega, 2560 + #define SCL_BAS1 21 + #define SDA_BAS1 20 + #define SCL_BAS2 19 + #define SDA_BAS2 A13 + #define SCL_BBS1 17 + #define SDA_BBS1 A14 + #define SCL_BBS2 18 + #define SDA_BBS2 A15 + + #define BTN_LEFT 16 + #define BTN_GO 15 + #define BTN_RIGHT 14 + #define LED_RED 16 + #define LED_GREEN 15 + #define LED_BLUE 14 + +#endif + +#endif + diff --git a/SoftI2cMaster.cpp b/SoftI2cMaster.cpp new file mode 100644 index 0000000..40c7c67 --- /dev/null +++ b/SoftI2cMaster.cpp @@ -0,0 +1,325 @@ +/* Arduino SoftI2cMaster Library + * Copyright (C) 2009 by William Greiman + * Modified by: Teja Chiluvuri + * + * This file is part of the Arduino SoftI2cMaster Library + * + * This Library 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 Library 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 the Arduino SoftI2cMaster Library. If not, see + * . + */ +#include "SoftI2cMaster.h" +const int BUFF_LEN = 16; +//------------------------------------------------------------------------------ +// WARNING don't change anything unless you verify the change with a scope +//------------------------------------------------------------------------------ +// set device address to begin +SoftI2cMaster::SoftI2cMaster(uint8_t devAddr){ + initialized = false; + deviceAddr = devAddr; + _so_buffer = (uint8_t*) calloc(BUFF_LEN, sizeof(uint8_t)); +} +//------------------------------------------------------------------------------ +// init pins and set bus high +void SoftI2cMaster::initProtocol(uint8_t sclPin, uint8_t sdaPin){ + if ( initialized ) return; + + if (!sclPin && !sdaPin){ + #if defined(__AVR__) + #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__) + sclPin_ = 19; // A5 + sdaPin_ = 18; // A4 + #else + sclPin_ = 21; + sdaPin_ = 20; + #endif +#elif defined(__PIC32MX__) + #if defined(_BOARD_UNO_) + sclPin_ = 46; // use SCL pin + sdaPin_ = 45; // use SDA pin + #elif defined(_BOARD_MEGA_) + sclPin_ = 21; + sdaPin_ = 20; + #endif + +#endif + } + else { + sclPin_ = sclPin; + sdaPin_ = sdaPin; + } + digitalWrite(sclPin_, LOW); + digitalWrite(sdaPin_, LOW); + pinMode(sclPin_,INPUT); + pinMode(sdaPin_,INPUT); + initialized = true; +} +//------------------------------------------------------------------------------ +// read a byte and send Ack if last is false else Nak to terminate read +uint8_t SoftI2cMaster::read(uint8_t last){ + uint8_t b = 0; + // make sure pullup enabled + pinMode(sdaPin_,INPUT); + // read byte + for (uint8_t i = 0; i < 8; i++) { + // don't change this loop unless you verify the change with a scope + b <<= 1; + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,INPUT); + if (digitalRead(sdaPin_)) b |= 1; + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,OUTPUT); + } + // send Ack or Nak + pinMode(sdaPin_, OUTPUT); + if (last) pinMode(sdaPin_, INPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,OUTPUT); + pinMode(sdaPin_,INPUT); + return b; +} +//------------------------------------------------------------------------------ +// send new address and read/write with stop +uint8_t SoftI2cMaster::restart(uint8_t addressRW){ + uint8_t e; + delayMicroseconds(I2C_DELAY_USEC); + stop(); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,OUTPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); + e = start(addressRW); + delayMicroseconds(I2C_DELAY_USEC); + return e; +} +//------------------------------------------------------------------------------ +// issue a start condition for i2c address with read/write bit +uint8_t SoftI2cMaster::start(uint8_t addressRW){ + pinMode(sdaPin_,OUTPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,OUTPUT); + delayMicroseconds(I2C_DELAY_USEC); + return write(addressRW); +} +//------------------------------------------------------------------------------ +// issue a stop condition +void SoftI2cMaster::stop(void){ + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sdaPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); +} +//------------------------------------------------------------------------------ +// write byte and return true for Ack or false for Nak +uint8_t SoftI2cMaster::write(uint8_t b){ + // write byte + for (uint8_t m = 0X80; m != 0; m >>= 1) { + if(m & b) pinMode(sdaPin_, INPUT); + else pinMode(sdaPin_, OUTPUT); + // don't change this loop unless you verify the change with a scope + pinMode(sclPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,OUTPUT); + delayMicroseconds(I2C_DELAY_USEC); + } + // get Ack or Nak + pinMode(sdaPin_,INPUT); + pinMode(sdaPin_, INPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sclPin_,INPUT); + delayMicroseconds(I2C_DELAY_USEC); + b = digitalRead(sdaPin_); + pinMode(sclPin_,OUTPUT); + delayMicroseconds(I2C_DELAY_USEC); + pinMode(sdaPin_, OUTPUT); + if ( b != 0 ) stop (); + return b == 0; +} +//------------------------------------------------------------------------------ +// read number of bytes from start register and return values; optional buffer +uint8_t* SoftI2cMaster::readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t* buf){ + //delay(20); + if (!buf) buf = _so_buffer; + bytes = min(bytes,BUFF_LEN); // avoid buffer overflow + memset(buf, 0, BUFF_LEN); + _error_code = 0; + // issue a start condition, send device address and write direction bit + if (!start(deviceAddr | I2C_WRITE)) { + _error_code = 2; + return false; + } + // send the start register address + if (!write(startRegister)) { + _error_code = 1; + return false; + } + // issue a repeated stop and start condition, send device address and read direction bit + if (!restart(deviceAddr | I2C_READ)) { + _error_code = 3; + return false; + } + // read data from the device and store into buffer + for (uint8_t i = 0; i < bytes; i++) { + // send Ack until last byte then send Ack + buf[i] = read(i == (bytes-1)); + } + // issue a stop condition + stop(); + return buf; +} +//------------------------------------------------------------------------------ +// write number of bytes from buffer, location is included in the buf +bool SoftI2cMaster::writeRegistersWithLocation(int bytes, uint8_t* buf){ + if (!start(deviceAddr | I2C_WRITE)) return false; + for (int i = 0; i < bytes; i++){ + if (!write(buf[i])) return false; + } + stop(); + return true; +} + +//------------------------------------------------------------------------------ +// write number of bytes from buffer at specified location. +bool SoftI2cMaster::writeRegisters (uint8_t location, uint8_t bytes_to_write, + uint8_t* buffer) +{ + if (!buffer) buffer = _so_buffer; + + uint8_t buf[BUFF_LEN]; + memset(buf, 0, BUFF_LEN); + buf[0] = location; + memmove(buf+1, buffer, bytes_to_write); + return writeRegistersWithLocation(bytes_to_write+1, buf); +} + +//------------------------------------------------------------------------------ +// write a single byte at speccified location. +bool SoftI2cMaster::writeByte (uint8_t location, uint8_t data) +{ + return writeRegisters(location, 1, &data); +} + +//------------------------------------------------------------------------------ +// write one integer (2 bytes) at speccified location. +bool SoftI2cMaster::writeInteger(uint8_t location, uint16_t data) +{ + uint8_t buf[2]; + buf[0] = data & 0xFF; + buf[1] = (data >> 8) & 0xFF; + return writeRegisters(location, 2, buf); +} + +//------------------------------------------------------------------------------ +// write one long (4 bytes) at speccified location. +bool SoftI2cMaster::writeLong (uint8_t location, uint32_t data) +{ + uint8_t buf[4]; + + buf[0] = data & 0xFF; + buf[1] = (data >> 8) & 0xFF; + buf[2] = (data >> 16) & 0xFF; + buf[3] = (data >> 24) & 0xFF; + return writeRegisters(location, 4, buf); +} + +//------------------------------------------------------------------------------ +// read string: convert read registers to character string +char* SoftI2cMaster::readString(uint8_t startRegister, uint8_t bytes, + uint8_t* buf, uint8_t len) +{ + char *x; + x = (char *) readRegisters(startRegister, bytes, buf); + if ( x == false ) { + return ""; + } + return (char *) x; +} +//------------------------------------------------------------------------------ +// read one byte, total of 8 bits +uint8_t SoftI2cMaster::readByte (uint8_t location){ + if ( readRegisters(location, 1) != false ) { + return _so_buffer[0]; + } else { + return 0; + } +} +//------------------------------------------------------------------------------ +// read integer, total of 2 bytes or 16 bits +int16_t SoftI2cMaster::readInteger (uint8_t location){ + + if ( readRegisters(location, 2) != false ) { + return _so_buffer[0] | (_so_buffer[1] << 8); + } else { + return 0; + } +} +//------------------------------------------------------------------------------ +// read long integer, total of 4 bytes or 32 bits +uint32_t SoftI2cMaster::readLong (uint8_t location){ + + if ( readRegisters(location, 4) != false ) { + return _so_buffer[0] | (_so_buffer[1] << 8) | (_so_buffer[2] << 16) | (_so_buffer[3] << 24); + } else { + return 0; + } +} + +// This is the status value returned from the last write command. +// A return value of zero indicates success. +// Non-zero results indicate failures. From libraries/Wire/utility/twi.c, they are: +// 1: write fail +// 2: start fail +// 3: restart fail +uint8_t SoftI2cMaster::getWriteErrorCode() +{ + return _error_code; +} + +//------------------------------------------------------------------------------ +// get firmware version +char* SoftI2cMaster::getFirmwareVersion(){ + return readString(0x00, 8); +} +//------------------------------------------------------------------------------ +// get vendor ID +char* SoftI2cMaster::getVendorID(){ + return readString(0x08, 8); +} +//------------------------------------------------------------------------------ +// get device ID +char* SoftI2cMaster::getDeviceID(){ + return readString(0x10, 8); +} +/** + * this function checks to see if there is + * any device at its specified address + */ +bool SoftI2cMaster::checkAddress() +{ +// FIXME: This function is not working correctly. + uint8_t *txBuffer; + int8_t x = 1; + if (!start(deviceAddr | I2C_WRITE)) return false; + stop(); + return true; +} + +bool SoftI2cMaster::setAddress(uint8_t address) +{ + deviceAddr = address; + return true; +} diff --git a/SoftI2cMaster.h b/SoftI2cMaster.h new file mode 100644 index 0000000..ab74d66 --- /dev/null +++ b/SoftI2cMaster.h @@ -0,0 +1,124 @@ +/* Arduino SoftI2cMaster Library + * Copyright (C) 2009 by William Greiman + * Modified by: Teja Chiluvuri + + * This file is part of the Arduino SoftI2cMaster Library + * + * This Library 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 Library 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 the Arduino SoftI2cMaster Library. If not, see + * . + */ +#ifndef SOFT_I2C_MASTER +#define SOFT_I2C_MASTER +#if defined(ARDUINO) && ARDUINO >= 100 +#include "Arduino.h" +#else +#include "WProgram.h" +#endif +#include + +// delay used to tweek signals +#define I2C_DELAY_USEC 30 + +// R/W direction bit to OR with address for start or restart +#define I2C_READ 1 +#define I2C_WRITE 0 + +/** + @brief This class implements software i2c interface used by EVShield/NXShield on Arduino + */ +class SoftI2cMaster { + + bool initialized; +private: + uint8_t sclPin_; + uint8_t sdaPin_; + uint8_t deviceAddr; + uint8_t _error_code; // Error code + +public: + /** internal buffer */ + uint8_t* _so_buffer; + + /** issue a start condition for i2c address with read/write bit */ + uint8_t start(uint8_t addressRW); + + /** issue a stop condition */ + void stop(void); + + /** issue stop condition, pull down scl, and start again */ + uint8_t restart(uint8_t addressRW); + + /** write byte and return true for Ack or false for Nak */ + uint8_t write(uint8_t b); + + /** read a byte and send Ack if last is false else Nak to terminate read */ + uint8_t read(uint8_t last); + + /** class constructor supplies the device address */ + SoftI2cMaster(uint8_t devAddr); + + /** init bus custom scl and sda pins are optional */ + void initProtocol(uint8_t sclPin = NULL, uint8_t sdaPin = NULL); + + /** read number of bytes from start register and return values; optional buffer */ + uint8_t* readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t* buf = NULL); + + /** write number of bytes from buffer */ + bool writeRegistersWithLocation(int bytes, uint8_t* buf); + + /** write bytes starting at the specified register location */ + bool writeRegisters (uint8_t location, uint8_t bytes_to_write, + uint8_t* buffer = 0); + + /** write one byte starting at the specified register location */ + bool writeByte (uint8_t location, uint8_t data); + + /** write integer starting at the specified register location */ + bool writeInteger(uint8_t location, uint16_t data); + + /** write integer type long starting at the specified register location */ + bool writeLong (uint8_t location, uint32_t data); + + /** read specified number of bytes starting at the startRegister */ + char* readString(uint8_t startRegister, uint8_t bytes, uint8_t* buf = NULL, uint8_t len=0); + + /** read one byte starting at the location */ + uint8_t readByte (uint8_t location); + + /** read two bytes and parse as an integer starting at the location */ + int16_t readInteger (uint8_t location); + + /** read and parse as integer type long at the location */ + uint32_t readLong (uint8_t location); + + /** get the version of the firmware */ + char* getFirmwareVersion(); + + /** get the name of the vendor */ + char* getVendorID(); + + /** get the name of the device */ + char* getDeviceID(); + + /** Get error of last i2c operation */ + uint8_t getWriteErrorCode(); + + bool checkAddress(); + + /** set the i2c address for this device + @param address new device address. + */ + bool setAddress(uint8_t address); +}; +#endif //SOFT_I2C_MASTER diff --git a/html/_base_i2_c_device_8h_source.html b/html/_base_i2_c_device_8h_source.html new file mode 100644 index 0000000..cad34b9 --- /dev/null +++ b/html/_base_i2_c_device_8h_source.html @@ -0,0 +1,290 @@ + + + + + + +EVShield: BaseI2CDevice.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
BaseI2CDevice.h
+
+
+
1 
+
2 // BaseI2CDevice.h
+
3 //
+
4 // This is a class for controlling some devices that
+
5 // communicate using the I2C protocol.
+
6 //
+
7 // Use at your own risk!
+
8 //
+
9 // Initial version: 2010-05-31 by Clinton Blackmore
+
10 
+
11 /*
+
12  This library is free software; you can redistribute it and/or
+
13  modify it under the terms of the GNU Lesser General Public
+
14  License as published by the Free Software Foundation; either
+
15  version 2.1 of the License, or (at your option) any later version.
+
16 
+
17  This library is distributed in the hope that it will be useful,
+
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
20  Lesser General Public License for more details.
+
21 
+
22  You should have received a copy of the GNU Lesser General Public
+
23  License along with this library; if not, write to the Free Software
+
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
25 */
+
26 
+
27 /* Change log
+
28 * 07/07/11 Deepak Patil Added getFeatureSet.
+
29 */
+
30 
+
31 #ifndef BASEI2CDEVICE_H
+
32 #define BASEI2CDEVICE_H
+
33 
+
34 #if defined(ARDUINO) && ARDUINO >= 100
+
35 #include "Arduino.h"
+
36 #else
+
37 #include "WProgram.h"
+
38 #endif
+
39 
+
40 #include <inttypes.h>
+
41 
+
43 inline uint16_t readIntFromBuffer(uint8_t* buf)
+
44 {
+
45  return buf[0] | (buf[1] << 8);
+
46 }
+
47 
+
49 inline uint32_t readLongFromBuffer(uint8_t* buf)
+
50 {
+
51  return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
+
52 }
+
53 
+
55 inline void writeByteToBuffer(uint8_t* buf, uint8_t data)
+
56 {
+
57  buf[0] = data;
+
58 }
+
59 
+
60 inline void writeByteToBuffer(uint8_t* buf, int8_t data)
+
61 {
+
62  writeByteToBuffer(buf, (uint8_t)data);
+
63 }
+
64 
+
66 inline void writeIntToBuffer(uint8_t* buf, uint16_t data)
+
67 {
+
68  buf[0] = data & 0xFF;
+
69  buf[1] = (data >> 8) & 0xFF;
+
70 }
+
71 
+
72 inline void writeIntToBuffer(uint8_t* buf, int16_t data)
+
73 {
+
74  writeIntToBuffer(buf, (uint16_t)data);
+
75 }
+
76 
+
78 inline void writeLongToBuffer(uint8_t* buf, uint32_t data)
+
79 {
+
80  buf[0] = data & 0xFF;
+
81  buf[1] = (data >> 8) & 0xFF;
+
82  buf[2] = (data >> 16) & 0xFF;
+
83  buf[3] = (data >> 24) & 0xFF;
+
84 }
+
85 
+
86 inline void writeLongToBuffer(uint8_t* buf, int32_t data)
+
87 {
+
88  writeLongToBuffer(buf, (uint32_t)data);
+
89 }
+
90 
+ +
95 {
+
96  // Note that this class is a base class, but not an abstract base class
+
97  // Feel free to instantiate BaseI2CDevice.
+
98 
+
99 public:
+
101  BaseI2CDevice(uint8_t i2c_address);
+
102 
+
104  void initProtocol();
+
105 
+
114  uint8_t* readRegisters (uint8_t start_register, uint8_t bytes_to_read,
+
115  uint8_t* buffer = 0, uint8_t buffer_length = 0, bool clear_buffer = false);
+
116 
+
121  uint8_t readByte (uint8_t location);
+
122 
+
127  int16_t readInteger (uint8_t location);
+
128 
+
133  uint32_t readLong (uint8_t location);
+
134 
+
142  char* readString (uint8_t location, uint8_t bytes_to_read,
+
143  uint8_t* buffer = 0, uint8_t buffer_length = 0);
+
144 
+
145 
+
151  bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write,
+
152  uint8_t* buffer = 0);
+
153 
+
158  bool writeByte (uint8_t location, uint8_t data);
+
159 
+
164  bool writeInteger(uint8_t location, uint16_t data);
+
165 
+
170  bool writeLong (uint8_t location, uint32_t data);
+
171 
+
173  bool checkAddress();
+
174 
+
178  bool setAddress(uint8_t i2c_address);
+
179 
+
181  uint8_t getAddress();
+
182 
+
184  uint8_t getWriteErrorCode();
+
185 
+
187  char* getFirmwareVersion();
+
188 
+
190  char* getVendorID();
+
191 
+
193  char* getDeviceID();
+
194 
+
196  char* getFeatureSet();
+
197 
+
200  static uint8_t* _buffer;
+
201 
+
202  static bool b_initialized;
+
203 
+
204 protected:
+
207  void setWriteErrorCode(uint8_t code);
+
208 
+
209 private:
+
210  uint8_t _device_address; // I2C address of the I2C device
+
211  uint8_t _write_error_code; // Error code from last write
+
212 };
+
213 
+
214 #endif // BASEI2CDEVICE_H
+
uint8_t getAddress()
Definition: BaseI2CDevice.cpp:292
+
void initProtocol()
Definition: BaseI2CDevice.cpp:53
+
uint32_t readLong(uint8_t location)
Definition: BaseI2CDevice.cpp:133
+
bool writeLong(uint8_t location, uint32_t data)
Definition: BaseI2CDevice.cpp:202
+
char * getFirmwareVersion()
Definition: BaseI2CDevice.cpp:222
+
bool writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
Definition: BaseI2CDevice.cpp:155
+
uint8_t readByte(uint8_t location)
Definition: BaseI2CDevice.cpp:117
+
char * getVendorID()
Definition: BaseI2CDevice.cpp:228
+
uint8_t getWriteErrorCode()
Definition: BaseI2CDevice.cpp:215
+
bool writeByte(uint8_t location, uint8_t data)
Definition: BaseI2CDevice.cpp:189
+
bool setAddress(uint8_t i2c_address)
Definition: BaseI2CDevice.cpp:286
+
bool writeInteger(uint8_t location, uint16_t data)
Definition: BaseI2CDevice.cpp:195
+
bool checkAddress()
Definition: BaseI2CDevice.cpp:260
+
char * readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
Definition: BaseI2CDevice.cpp:141
+
BaseI2CDevice(uint8_t i2c_address)
Definition: BaseI2CDevice.cpp:39
+
char * getDeviceID()
Definition: BaseI2CDevice.cpp:234
+
char * getFeatureSet()
Definition: BaseI2CDevice.cpp:242
+
static uint8_t * _buffer
Definition: BaseI2CDevice.h:200
+
int16_t readInteger(uint8_t location)
Definition: BaseI2CDevice.cpp:124
+
void setWriteErrorCode(uint8_t code)
Definition: BaseI2CDevice.cpp:248
+
uint8_t * readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
Definition: BaseI2CDevice.cpp:65
+
This class implements hardware I2C protocol used by EVShield/NXShield on an Arduino.
Definition: BaseI2CDevice.h:94
+
+
+ + + + diff --git a/html/_e_v_shield_8h.html b/html/_e_v_shield_8h.html new file mode 100644 index 0000000..9908037 --- /dev/null +++ b/html/_e_v_shield_8h.html @@ -0,0 +1,681 @@ + + + + + + +EVShield: EVShield.h File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShield.h File Reference
+
+
+
#include "SHDefines.h"
+#include "EVShieldI2C.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  EVShieldBank
 This class defines methods for the EVShield Bank(s). More...
 
class  EVShieldBankB
 EVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods for the EVShield Bank B. More...
 
class  EVShield
 This class defines methods to access EVShield features. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define SH_CONTROL_SPEED   0x01
 
+#define SH_CONTROL_RAMP   0x02
 
+#define SH_CONTROL_RELATIVE   0x04
 
+#define SH_CONTROL_TACHO   0x08
 
+#define SH_CONTROL_BRK   0x10
 
+#define SH_CONTROL_ON   0x20
 
+#define SH_CONTROL_TIME   0x40
 
+#define SH_CONTROL_GO   0x80
 
+#define SH_STATUS_SPEED   0x01
 
+#define SH_STATUS_RAMP   0x02
 
+#define SH_STATUS_MOVING   0x04
 
+#define SH_STATUS_TACHO   0x08
 
+#define SH_STATUS_BREAK   0x10
 
+#define SH_STATUS_OVERLOAD   0x20
 
+#define SH_STATUS_TIME   0x40
 
+#define SH_STATUS_STALL   0x80
 
+#define SH_COMMAND   0x41
 
+#define SH_VOLTAGE   0x6E
 
+#define SH_SETPT_M1   0x42
 
+#define SH_SPEED_M1   0x46
 
+#define SH_TIME_M1   0x47
 
+#define SH_CMD_B_M1   0x48
 
+#define SH_CMD_A_M1   0x49
 
+#define SH_SETPT_M2   0x4A
 
+#define SH_SPEED_M2   0x4E
 
+#define SH_TIME_M2   0x4F
 
+#define SH_CMD_B_M2   0x50
 
+#define SH_CMD_A_M2   0x51
 
+#define SH_POSITION_M1   0x52
 
+#define SH_POSITION_M2   0x56
 
+#define SH_STATUS_M1   0x5A
 
+#define SH_STATUS_M2   0x5B
 
+#define SH_TASKS_M1   0x5C
 
+#define SH_TASKS_M2   0x5D
 
+#define SH_ENCODER_PID   0x5E
 
+#define SH_SPEED_PID   0x64
 
+#define SH_PASS_COUNT   0x6A
 
+#define SH_TOLERANCE   0x6B
 
+#define SH_S1_MODE   0x6F
 
+#define SH_S1_EV3_MODE   0x6F
 
+#define SH_S1_ANALOG   0x70
 
+#define SH_S2_MODE   0xA3
 
+#define SH_S2_EV3_MODE   0x6F
 
+#define SH_S2_ANALOG   0xA4
 
+#define SH_BTN_PRESS   0xDA
 
+#define SH_RGB_LED   0xD7
 
+#define SH_CENTER_RGB_LED   0xDE
 
+#define SH_Speed_Full   90
 
+#define SH_Speed_Medium   60
 
+#define SH_Speed_Slow   25
 
#define SH_Bank_A   0x34
 
#define SH_Bank_B   0x36
 
#define SH_Type_NONE   0x00
 
+#define SH_Type_SWITCH   0x01
 
+#define SH_Type_ANALOG   0x02
 
+#define SH_Type_LIGHT_REFLECTED   0x03
 
+#define SH_Type_LIGHT_AMBIENT   0x04
 
#define SH_Type_I2C   0x09
 
#define SH_Type_COLORFULL   13
 
#define SH_Type_COLORRED   14
 
#define SH_Type_COLORGREEN   15
 
#define SH_Type_COLORBLUE   16
 
#define SH_Type_COLORNONE   17
 
#define SH_Type_EV3_SWITCH   18
 
#define SH_Type_EV3   19
 
#define SH_S1   1
 
#define SH_S2   2
 
+ + + + + + + + + + + +

+Enumerations

enum  SH_Motor { SH_Motor_1 = 0x01, +SH_Motor_2 = 0x02, +SH_Motor_Both = 0x03 + }
 
enum  SH_Next_Action { SH_Next_Action_Float = 0x00, +SH_Next_Action_Brake = 0x01, +SH_Next_Action_BrakeHold = 0x02 + }
 
enum  SH_Direction { SH_Direction_Reverse = 0x00, +SH_Direction_Forward = 0x01 + }
 
enum  SH_Move { SH_Move_Absolute = 0x00, +SH_Move_Relative = 0x01 + }
 
enum  SH_Completion_Wait { SH_Completion_Dont_Wait = 0x00, +SH_Completion_Wait_For = 0x01 + }
 
+ + + +

+Functions

bool format_bin (uint8_t i, char *s)
 
+

Detailed Description

+

EVShield.h defines main interfaces used in the EVShield library.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define SH_Bank_A   0x34
+
+

I2C address of bank A

+ +
+
+ +
+
+ + + + +
#define SH_Bank_B   0x36
+
+

I2C address of bank B

+ +
+
+ +
+
+ + + + +
#define SH_S1   1
+
+

This is used internally to address Sensor Port 1. Do not use this in sketches. Sketches should use SH_BankPort enums.

+ +
+
+ +
+
+ + + + +
#define SH_S2   2
+
+

This is used internally to address Sensor Port 2. Do not use this in sketches. Sketches should use SH_BankPort enums.

+ +
+
+ +
+
+ + + + +
#define SH_Type_COLORBLUE   16
+
+

In this type the sensor connected is NXT color sensor in BLUE color mode

+ +
+
+ +
+
+ + + + +
#define SH_Type_COLORFULL   13
+
+

In this type the sensor connected is NXT color sensor in color mode

+ +
+
+ +
+
+ + + + +
#define SH_Type_COLORGREEN   15
+
+

In this type the sensor connected is NXT color sensor in GREEN color mode

+ +
+
+ +
+
+ + + + +
#define SH_Type_COLORNONE   17
+
+

In this type the sensor connected is NXT color sensor in ambient light mode

+ +
+
+ +
+
+ + + + +
#define SH_Type_COLORRED   14
+
+

In this type the sensor connected is NXT color sensor in RED color mode

+ +
+
+ +
+
+ + + + +
#define SH_Type_EV3   19
+
+

In this type the sensor connected is EV3 UART sensor

+ +
+
+ +
+
+ + + + +
#define SH_Type_EV3_SWITCH   18
+
+

In this type the sensor connected is EV3 touch sensor

+ +
+
+ +
+
+ + + + +
#define SH_Type_I2C   0x09
+
+

In this type the sensor connected should be an i2c device.

+ +
+
+ +
+
+ + + + +
#define SH_Type_NONE   0x00
+
+

In this type the sensor port is not defined and used.

+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum SH_Completion_Wait
+
+ + + +
Enumerator
SH_Completion_Dont_Wait  +

Don't wait for motor to finish, program will continue with next function

+
SH_Completion_Wait_For  +

Wait for motor to finish, program will wait until current function finishes it's operation

+
+ +
+
+ +
+
+ + + + +
enum SH_Direction
+
+

Motor direction related constants.

+ + + +
Enumerator
SH_Direction_Reverse  +

Run motor in reverse direction

+
SH_Direction_Forward  +

Run motor in forward direction

+
+ +
+
+ +
+
+ + + + +
enum SH_Motor
+
+

Motor selection related constants

+ + + + +
Enumerator
SH_Motor_1  +

Choose Motor 1 for selected operation

+
SH_Motor_2  +

Choose Motor 2 for selected operation

+
SH_Motor_Both  +

Choose Both Motors for selected operation

+
+ +
+
+ +
+
+ + + + +
enum SH_Move
+
+ + + +
Enumerator
SH_Move_Absolute  +

Move the tach to absolute value provided

+
SH_Move_Relative  +

Move the tach relative to previous position

+
+ +
+
+ +
+
+ + + + +
enum SH_Next_Action
+
+ + + + +
Enumerator
SH_Next_Action_Float  +

stop and let the motor coast.

+
SH_Next_Action_Brake  +

apply brakes, and resist change to tachometer, but if tach position is forcibly changed, do not restore position

+
SH_Next_Action_BrakeHold  +

apply brakes, and restore externally forced change to tachometer

+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool format_bin (uint8_t i,
char * s 
)
+
+

This function formats an integer in binary format.

+
Parameters
+ + + +
i8 bit integer value
sreturned string of the binary representation
+
+
+ +
+
+
+
+ + + + diff --git a/html/_e_v_shield_8h.js b/html/_e_v_shield_8h.js new file mode 100644 index 0000000..2543563 --- /dev/null +++ b/html/_e_v_shield_8h.js @@ -0,0 +1,96 @@ +var _e_v_shield_8h = +[ + [ "EVShieldBank", "class_e_v_shield_bank.html", "class_e_v_shield_bank" ], + [ "EVShieldBankB", "class_e_v_shield_bank_b.html", "class_e_v_shield_bank_b" ], + [ "EVShield", "class_e_v_shield.html", "class_e_v_shield" ], + [ "SH_Bank_A", "_e_v_shield_8h.html#a8ba243786ea3e34a22595e477cfa3c92", null ], + [ "SH_Bank_B", "_e_v_shield_8h.html#aa57f621cc96fa9cae39367ab1a161526", null ], + [ "SH_BTN_PRESS", "_e_v_shield_8h.html#abe2536d29b5c6a7d0eb95f8370169fbb", null ], + [ "SH_CENTER_RGB_LED", "_e_v_shield_8h.html#a9887f77c392da6de120e1571a38c78c1", null ], + [ "SH_CMD_A_M1", "_e_v_shield_8h.html#a3f20fcc802d905158a666d0344861339", null ], + [ "SH_CMD_A_M2", "_e_v_shield_8h.html#a77cffe47e7b8c612a1b9b510d094d89d", null ], + [ "SH_CMD_B_M1", "_e_v_shield_8h.html#ace1beeb90a19de5a3a3ec39df2b4fc77", null ], + [ "SH_CMD_B_M2", "_e_v_shield_8h.html#a2259bacb082ac0a4588071c0dcf4ee9f", null ], + [ "SH_COMMAND", "_e_v_shield_8h.html#a4d228b7806e8824a061af1b752556a17", null ], + [ "SH_CONTROL_BRK", "_e_v_shield_8h.html#aa1af25e3772ed002feb2723c1ebf315d", null ], + [ "SH_CONTROL_GO", "_e_v_shield_8h.html#a49252efaf5620901afad850401758c73", null ], + [ "SH_CONTROL_ON", "_e_v_shield_8h.html#aacdd0d769a13463e56ea2888e714781a", null ], + [ "SH_CONTROL_RAMP", "_e_v_shield_8h.html#aa45f99cfebdff60b5e4f033a73d7897b", null ], + [ "SH_CONTROL_RELATIVE", "_e_v_shield_8h.html#aa55980232574ec1c688f1aa9c1b4e5bc", null ], + [ "SH_CONTROL_SPEED", "_e_v_shield_8h.html#ac734d8dff71b9160e9e0263b3c10d8d7", null ], + [ "SH_CONTROL_TACHO", "_e_v_shield_8h.html#a269807b40690b97a9419e3f375358442", null ], + [ "SH_CONTROL_TIME", "_e_v_shield_8h.html#a578d352fa21e142b82900a640f17ea67", null ], + [ "SH_ENCODER_PID", "_e_v_shield_8h.html#a042468eb976dec3cc22a785a581b8d0f", null ], + [ "SH_PASS_COUNT", "_e_v_shield_8h.html#ac817b5a31ab6006b2bae59288708c232", null ], + [ "SH_POSITION_M1", "_e_v_shield_8h.html#adaee2fe69b79156793e04d38af7cc956", null ], + [ "SH_POSITION_M2", "_e_v_shield_8h.html#af805f791597c900426fb0438771f27da", null ], + [ "SH_RGB_LED", "_e_v_shield_8h.html#a3e70a3566b95f95ee3c01ac03f4510a2", null ], + [ "SH_S1", "_e_v_shield_8h.html#ae4b22cb9a9f5606438028fa56752fc32", null ], + [ "SH_S1_ANALOG", "_e_v_shield_8h.html#a9e19637bb3d22a20ffc5645f20098f23", null ], + [ "SH_S1_EV3_MODE", "_e_v_shield_8h.html#aa79a234b9038a43b4b3d11817fc774be", null ], + [ "SH_S1_MODE", "_e_v_shield_8h.html#a13b339f2263c0fd662bb9adbb4043802", null ], + [ "SH_S2", "_e_v_shield_8h.html#a6fad125ff964ca0354d51e63c4514990", null ], + [ "SH_S2_ANALOG", "_e_v_shield_8h.html#a99cc5ee8ae39a23f778cd611ea1dcdbc", null ], + [ "SH_S2_EV3_MODE", "_e_v_shield_8h.html#ae804ba4f9b6a5c3c8d10e46a6361c83b", null ], + [ "SH_S2_MODE", "_e_v_shield_8h.html#a866e83c802695379aa73c86e7905ad48", null ], + [ "SH_SETPT_M1", "_e_v_shield_8h.html#acba9f4c9c6f24c27301cc739aa942f3f", null ], + [ "SH_SETPT_M2", "_e_v_shield_8h.html#ad3ac9df684eb1b0bc74105fdbfaff5ba", null ], + [ "SH_Speed_Full", "_e_v_shield_8h.html#ac1a351c0d942b1b20329d428c4cee6c3", null ], + [ "SH_SPEED_M1", "_e_v_shield_8h.html#a232a8f16fa4903b3ace5f31d170a3012", null ], + [ "SH_SPEED_M2", "_e_v_shield_8h.html#af3e9f9e53d9ad7eacda26270cd357713", null ], + [ "SH_Speed_Medium", "_e_v_shield_8h.html#a2e4b4d0ab5539a6c92c6c72eeb2ca854", null ], + [ "SH_SPEED_PID", "_e_v_shield_8h.html#a635fe1d4086777fd03833a2482793f39", null ], + [ "SH_Speed_Slow", "_e_v_shield_8h.html#a2af08dffaed98b1d4992c6d3ecf85d4c", null ], + [ "SH_STATUS_BREAK", "_e_v_shield_8h.html#a51bdc0dfb42dfdc508b9faf8cef45975", null ], + [ "SH_STATUS_M1", "_e_v_shield_8h.html#a5fb85f77cfbc69bfafe54a8178a30404", null ], + [ "SH_STATUS_M2", "_e_v_shield_8h.html#a83fd01df907206fa37839934fa9b797a", null ], + [ "SH_STATUS_MOVING", "_e_v_shield_8h.html#aa963ed61fa7e52f790b8fa71e025b9f2", null ], + [ "SH_STATUS_OVERLOAD", "_e_v_shield_8h.html#a5a39945c07b507bec1a09c57728da1d7", null ], + [ "SH_STATUS_RAMP", "_e_v_shield_8h.html#a80853428fd91200eb456aed0b16381b7", null ], + [ "SH_STATUS_SPEED", "_e_v_shield_8h.html#abd5d7ebf1d97ca3df121d19019d8d42a", null ], + [ "SH_STATUS_STALL", "_e_v_shield_8h.html#a2433d1e70585acbad494a4fe49ce91eb", null ], + [ "SH_STATUS_TACHO", "_e_v_shield_8h.html#ac343c30b3f308c9bd96bef7fc6be2725", null ], + [ "SH_STATUS_TIME", "_e_v_shield_8h.html#ac55ebfc1e575a42ab7d5c81ecd8041fd", null ], + [ "SH_TASKS_M1", "_e_v_shield_8h.html#a7acf25031c8ab769e2542d45a99531c9", null ], + [ "SH_TASKS_M2", "_e_v_shield_8h.html#a95b229cb78c197a67595e64298ab8353", null ], + [ "SH_TIME_M1", "_e_v_shield_8h.html#aa965e1b28e2c8a5aa6d250cecfa9e766", null ], + [ "SH_TIME_M2", "_e_v_shield_8h.html#affd2a856ed7627ee6ac46607af29b40b", null ], + [ "SH_TOLERANCE", "_e_v_shield_8h.html#a12e82c689c8dfdaa02bf2b2e6a320585", null ], + [ "SH_Type_ANALOG", "_e_v_shield_8h.html#a7180516dde8808566450257fd4aa5dac", null ], + [ "SH_Type_COLORBLUE", "_e_v_shield_8h.html#adf4f242fda0e09b29b974309224dfd88", null ], + [ "SH_Type_COLORFULL", "_e_v_shield_8h.html#ac2709404f77434983ad70bf845539315", null ], + [ "SH_Type_COLORGREEN", "_e_v_shield_8h.html#a3f93ee766e7ff16868faff020220ada2", null ], + [ "SH_Type_COLORNONE", "_e_v_shield_8h.html#a78546a1c7bac7dba4bee0b54b3e57dd3", null ], + [ "SH_Type_COLORRED", "_e_v_shield_8h.html#a1eeef65ed9a797def007492385518380", null ], + [ "SH_Type_EV3", "_e_v_shield_8h.html#a64b6dfb270715869746bb72c0a032dcc", null ], + [ "SH_Type_EV3_SWITCH", "_e_v_shield_8h.html#a97de99e5a8467c35eea838f9e6936dfd", null ], + [ "SH_Type_I2C", "_e_v_shield_8h.html#a9edbde546947365012d6d4b439a670e7", null ], + [ "SH_Type_LIGHT_AMBIENT", "_e_v_shield_8h.html#a8b059b2b8ce9ffa3de0bc075c04c6166", null ], + [ "SH_Type_LIGHT_REFLECTED", "_e_v_shield_8h.html#abe3a27a04df94a3ecee445acdbc83a91", null ], + [ "SH_Type_NONE", "_e_v_shield_8h.html#a0da0061f1b3a2e5102649d620b2fafab", null ], + [ "SH_Type_SWITCH", "_e_v_shield_8h.html#a6cfe280400ef849ef0b13bb0308b6fba", null ], + [ "SH_VOLTAGE", "_e_v_shield_8h.html#a6699bb175d8c74712dd32b19a888aa36", null ], + [ "SH_Completion_Wait", "_e_v_shield_8h.html#a986212bb6e1f072297c91383b3170f5d", [ + [ "SH_Completion_Dont_Wait", "_e_v_shield_8h.html#a986212bb6e1f072297c91383b3170f5da5fb00e4ae0ff6bddd24b6be52e8c72bf", null ], + [ "SH_Completion_Wait_For", "_e_v_shield_8h.html#a986212bb6e1f072297c91383b3170f5da35b2439a2b05591906d9e3d4a90e272d", null ] + ] ], + [ "SH_Direction", "_e_v_shield_8h.html#aa3cb754401f8d9b64c3924a94012ff3e", [ + [ "SH_Direction_Reverse", "_e_v_shield_8h.html#aa3cb754401f8d9b64c3924a94012ff3ea8fee0320e95cf9187d73bd337758b823", null ], + [ "SH_Direction_Forward", "_e_v_shield_8h.html#aa3cb754401f8d9b64c3924a94012ff3ea0da82bb3acf17016d1034570be5f9c5d", null ] + ] ], + [ "SH_Motor", "_e_v_shield_8h.html#a2e5bec258194ee2e47725ce7abed280b", [ + [ "SH_Motor_1", "_e_v_shield_8h.html#a2e5bec258194ee2e47725ce7abed280ba0339f1bd8e906e9c67ec037aec3e34b4", null ], + [ "SH_Motor_2", "_e_v_shield_8h.html#a2e5bec258194ee2e47725ce7abed280baed883b8df0f222658e2e07eccf930689", null ], + [ "SH_Motor_Both", "_e_v_shield_8h.html#a2e5bec258194ee2e47725ce7abed280babedd6672af3bad13a0352ed4cd6d73ef", null ] + ] ], + [ "SH_Move", "_e_v_shield_8h.html#ae4da8a21052a5af8651cba00c0a4e5ac", [ + [ "SH_Move_Absolute", "_e_v_shield_8h.html#ae4da8a21052a5af8651cba00c0a4e5aca5540a63cb13e967ab6aab7edaec1a031", null ], + [ "SH_Move_Relative", "_e_v_shield_8h.html#ae4da8a21052a5af8651cba00c0a4e5acab7213751f75359b0134090e700d41215", null ] + ] ], + [ "SH_Next_Action", "_e_v_shield_8h.html#a7b2e1367beae77aa353b830307d2a807", [ + [ "SH_Next_Action_Float", "_e_v_shield_8h.html#a7b2e1367beae77aa353b830307d2a807abd7ba7535a029002cef9c664897ce98d", null ], + [ "SH_Next_Action_Brake", "_e_v_shield_8h.html#a7b2e1367beae77aa353b830307d2a807a914738f23f2eb194a4dbde95dc79efa1", null ], + [ "SH_Next_Action_BrakeHold", "_e_v_shield_8h.html#a7b2e1367beae77aa353b830307d2a807a5174d4b3634d7e98601bc35b5655936a", null ] + ] ], + [ "format_bin", "_e_v_shield_8h.html#ab4209f7df9f73763a315e6d1e2a6ce3f", null ] +]; \ No newline at end of file diff --git a/html/_e_v_shield_8h_source.html b/html/_e_v_shield_8h_source.html new file mode 100644 index 0000000..0b0e618 --- /dev/null +++ b/html/_e_v_shield_8h_source.html @@ -0,0 +1,550 @@ + + + + + + +EVShield: EVShield.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShield.h
+
+
+Go to the documentation of this file.
1 
+
33 /*
+
34  * EVShield interface library
+
35  * Copyright (C) 2015initProtocols mindsensors.com
+
36  * 12/18/2014 Nitin Patil -- modified to work with EVshield
+
37  *
+
38  * This file is part of EVShield interface library.
+
39  * This library is free software; you can redistribute it and/or
+
40  * modify it under the terms of the GNU Lesser General Public
+
41  * License as published by the Free Software Foundation; either
+
42  * version 2.1 of the License, or (at your option) any later version.
+
43 
+
44  * This library is distributed in the hope that it will be useful,
+
45  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
46  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
47  * Lesser General Public License for more details.
+
48 
+
49  * You should have received a copy of the GNU Lesser General Public
+
50  * License along with this library; if not, write to the Free Software
+
51  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
52  */
+
53 
+
54 #ifndef EVShield_H
+
55 #define EVShield_H
+
56 
+
57 #include "SHDefines.h"
+
58 
+
59 // Motor control related constants.
+
60 #define SH_CONTROL_SPEED 0x01
+
61 #define SH_CONTROL_RAMP 0x02
+
62 #define SH_CONTROL_RELATIVE 0x04
+
63 #define SH_CONTROL_TACHO 0x08
+
64 #define SH_CONTROL_BRK 0x10
+
65 #define SH_CONTROL_ON 0x20
+
66 #define SH_CONTROL_TIME 0x40
+
67 #define SH_CONTROL_GO 0x80
+
68 
+
69 #define SH_STATUS_SPEED 0x01
+
70 #define SH_STATUS_RAMP 0x02
+
71 #define SH_STATUS_MOVING 0x04
+
72 #define SH_STATUS_TACHO 0x08
+
73 #define SH_STATUS_BREAK 0x10
+
74 #define SH_STATUS_OVERLOAD 0x20
+
75 #define SH_STATUS_TIME 0x40
+
76 #define SH_STATUS_STALL 0x80
+
77 
+
78 #define SH_COMMAND 0x41
+
79 #define SH_VOLTAGE 0x6E
+
80 
+
81 #define SH_SETPT_M1 0x42
+
82 #define SH_SPEED_M1 0x46
+
83 #define SH_TIME_M1 0x47
+
84 #define SH_CMD_B_M1 0x48
+
85 #define SH_CMD_A_M1 0x49
+
86 
+
87 #define SH_SETPT_M2 0x4A
+
88 #define SH_SPEED_M2 0x4E
+
89 #define SH_TIME_M2 0x4F
+
90 #define SH_CMD_B_M2 0x50
+
91 #define SH_CMD_A_M2 0x51
+
92 
+
93 /*
+
94  * Read registers.
+
95  */
+
96 #define SH_POSITION_M1 0x52
+
97 #define SH_POSITION_M2 0x56
+
98 #define SH_STATUS_M1 0x5A
+
99 #define SH_STATUS_M2 0x5B
+
100 #define SH_TASKS_M1 0x5C
+
101 #define SH_TASKS_M2 0x5D
+
102 
+
103 #define SH_ENCODER_PID 0x5E
+
104 #define SH_SPEED_PID 0x64
+
105 #define SH_PASS_COUNT 0x6A
+
106 #define SH_TOLERANCE 0x6B
+
107 
+
108 #define SH_S1_MODE 0x6F
+
109 #define SH_S1_EV3_MODE 0x6F
+
110 #define SH_S1_ANALOG 0x70
+
111 
+
112 #define SH_S2_MODE 0xA3
+
113 #define SH_S2_EV3_MODE 0x6F
+
114 #define SH_S2_ANALOG 0xA4
+
115 
+
116 #define SH_BTN_PRESS 0xDA
+
117 #define SH_RGB_LED 0xD7
+
118 #define SH_CENTER_RGB_LED 0xDE
+
119 
+
120 /* constants to be used by user programs */
+
124 typedef enum {
+
125  SH_Motor_1 = 0x01,
+
126  SH_Motor_2 = 0x02,
+ +
128 } SH_Motor;
+
129 
+
130 /*
+
131  * \enum SH_Next_Action Next action related constants
+
132  */
+
133 typedef enum {
+ + + + +
138 
+
142 typedef enum {
+ + +
145 } SH_Direction;
+
146 
+
147 /*
+
148  * \enum SH_Move Tachometer movement related constants
+
149  */
+
150 typedef enum {
+ + +
153 } SH_Move;
+
154 
+
155 /*
+
156  * \enum SH_Completion_Wait Whether to wait for motor to finish it's current task or not
+
157  */
+
158 typedef enum {
+ + + +
162 
+
163 /*
+
164  * Speed constants, these are just convenience constants,
+
165  * You can use any value between 0 and 100.
+
166  */
+
167 #define SH_Speed_Full 90
+
168 #define SH_Speed_Medium 60
+
169 #define SH_Speed_Slow 25
+
170 
+
171 /*
+
172  * EVShield has two banks, and each of them has different I2C address.
+
173  * each bank has 2 motors and 2 sensors.
+
174  *
+
175  */
+
180 #define SH_Bank_A 0x34
+
181 
+
185 #define SH_Bank_B 0x36
+
186 
+
187 
+
188 /*
+
189  * Sensor type primitives
+
190  *
+
191  */
+
192 
+
197 #define SH_Type_NONE 0x00
+
198 
+
199 #define SH_Type_SWITCH 0x01
+
200 
+
205 #define SH_Type_ANALOG 0x02
+
206 
+
207 
+
208 #define SH_Type_LIGHT_REFLECTED 0x03
+
209 
+
213 #define SH_Type_LIGHT_AMBIENT 0x04
+
214 
+
218 #define SH_Type_I2C 0x09
+
219 
+
224 #define SH_Type_COLORFULL 13
+
225 
+
229 #define SH_Type_COLORRED 14
+
230 
+
234 #define SH_Type_COLORGREEN 15
+
235 
+
239 #define SH_Type_COLORBLUE 16
+
240 
+
244 #define SH_Type_COLORNONE 17
+
245 
+
249 #define SH_Type_EV3_SWITCH 18
+
250 
+
254 #define SH_Type_EV3 19
+
255 
+
256 
+
257 
+
258 
+
259 
+
260 /*
+
261  * Sensor defines.
+
262  */
+
269 #define SH_S1 1
+
270 
+
276 #define SH_S2 2
+
277 
+
278 #include "EVShieldI2C.h"
+
279 #if defined(__AVR__)
+
280  #include <avr/io.h>
+
281  #include <avr/interrupt.h>
+
282 #endif
+
283 
+
287 class EVShieldBank : public EVShieldI2C
+
288 {
+
289 public:
+
291  EVShieldBank(uint8_t i2c_address = SH_Bank_A);
+
292 
+ +
301 
+ +
305 
+
310  uint8_t EVShieldIssueCommand(char command);
+
311 
+
312  //
+
313  // Motor Operation APIs.
+
314  //
+
319  bool motorSetEncoderTarget(SH_Motor which_motor, long target);
+
320 
+
326  long motorGetEncoderTarget(SH_Motor which_motor);
+
327 
+
333  bool motorSetSpeed(SH_Motor which_motor, int speed);
+
334 
+
340  int8_t motorGetSpeed(SH_Motor which_motor);
+
341 
+
347  bool motorSetTimeToRun(SH_Motor which_motor, int seconds);
+
348 
+
354  uint8_t motorGetTimeToRun(SH_Motor which_motor);
+
355 
+
366  bool motorSetCommandRegB(SH_Motor which_motor, uint8_t value);
+
375  uint8_t motorGetCommandRegB(SH_Motor which_motor);
+
385  bool motorSetCommandRegA(SH_Motor which_motor, uint8_t value);
+
394  uint8_t motorGetCommandRegA(SH_Motor which_motor);
+
395 
+
401  int32_t motorGetEncoderPosition(SH_Motor which_motor);
+
402 
+
410  uint8_t motorGetStatusByte(SH_Motor which_motor);
+
411 
+
418  uint8_t motorGetTasksRunningByte(SH_Motor which_motor);
+
419 
+
427  bool motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd);
+
428 
+
436  bool motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd);
+
437 
+
438  bool centerLedSetRGB(uint8_t R, uint8_t G, uint8_t B);
+
439 
+
440  // Set the RGBLED that shows RGB color
+
441 
+
442  bool ledSetRGB(uint8_t R, uint8_t G, uint8_t B);
+
443 
+
451  bool motorSetPassCount(uint8_t pass_count);
+
452 
+
459  bool motorSetTolerance(uint8_t tolerance);
+
460 
+
465  bool motorReset();
+
466 
+
471  bool motorStartBothInSync();
+
472 
+
477  bool motorResetEncoder(SH_Motor which_motor);
+
478 
+
489  bool motorSetSpeedTimeAndControl(SH_Motor which_motors, int speed,
+
490  uint8_t duration, uint8_t control);
+
491 
+ +
505  long encoder, int speed,
+
506  uint8_t duration, uint8_t control);
+
507 
+
514  uint8_t motorIsTimeDone(SH_Motor which_motors);
+
515 
+
522  uint8_t motorWaitUntilTimeDone(SH_Motor which_motors);
+
523 
+
530  uint8_t motorIsTachoDone(SH_Motor which_motors);
+
531 
+
538  uint8_t motorWaitUntilTachoDone(SH_Motor which_motors);
+
539 
+
547  void motorRunUnlimited(SH_Motor which_motors, SH_Direction direction,
+
548  int speed);
+
549 
+
560  uint8_t motorRunSeconds(SH_Motor which_motors, SH_Direction direction,
+
561  int speed, uint8_t duration,
+
562  SH_Completion_Wait wait_for_completion,
+
563  SH_Next_Action next_action);
+
564 
+
577  uint8_t motorRunTachometer(SH_Motor which_motors, SH_Direction direction,
+
578  int speed, long tachometer,
+
579  SH_Move relative,
+
580  SH_Completion_Wait wait_for_completion,
+
581  SH_Next_Action next_action);
+
582 
+
594  uint8_t motorRunDegrees(SH_Motor which_motors, SH_Direction direction,
+
595  int speed, long degrees,
+
596  SH_Completion_Wait wait_for_completion,
+
597  SH_Next_Action next_action);
+
598 
+
610  uint8_t motorRunRotations(SH_Motor which_motors, SH_Direction direction,
+
611  int speed, long rotations,
+
612  SH_Completion_Wait wait_for_completion,
+
613  SH_Next_Action next_action);
+
614 
+
620  bool motorStop(SH_Motor which_motors, SH_Next_Action next_action);
+
621 
+
622 
+
623  //
+
624  // EVShield sensor functions.
+
625  //
+
626 public:
+
633  bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type);
+
634 
+
640  int sensorReadRaw(uint8_t which_sensor);
+
641 
+
642 };
+
643 
+ +
649 {
+
650 private:
+
651 
+
652 public:
+
654  EVShieldBankB(uint8_t i2c_address_b = SH_Bank_B);
+
660  int sensorReadRaw(uint8_t which_sensor);
+
661 
+
668  bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type);
+
669 };
+
670 
+
671 
+
675 class EVShield
+
676 {
+
677 public:
+
681  uint8_t m_protocol;
+ + +
688 
+
690  EVShield(uint8_t i2c_address_a = SH_Bank_A,
+
691  uint8_t i2c_address_b = SH_Bank_B);
+
692 
+
698  void init(SH_Protocols protocol=SH_HardwareI2C);
+
699 
+
703  void initLEDTimers();
+
704 
+
708  void I2CTimer();
+
709 
+ +
715 
+
716 
+
722  bool getButtonState(uint8_t btn);
+
723 
+
731  void waitForButtonPress(uint8_t btn, uint8_t led_pattern=0);
+
732 
+
733 
+
741  void ledSetRGB(uint8_t red = 0, uint8_t green = 0, uint8_t blue = 0);
+
742 
+
747  void ledBreathingPattern();
+
748 
+
753  void ledHeartBeatPattern();
+
754 };
+
755 
+
760 extern bool format_bin(uint8_t i, char *s);
+
761 
+
762 #endif
+
Definition: EVShield.h:134
+
int8_t motorGetSpeed(SH_Motor which_motor)
Definition: EVShield.cpp:199
+
void initProtocols(SH_Protocols protocol=SH_HardwareI2C)
Definition: EVShield.cpp:71
+
bool motorSetEncoderSpeedTimeAndControl(SH_Motor which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
Definition: EVShield.cpp:388
+
bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type)
Definition: EVShield.cpp:680
+
bool motorSetTimeToRun(SH_Motor which_motor, int seconds)
Definition: EVShield.cpp:206
+
Definition: SHDefines.h:61
+
void ledBreathingPattern()
Definition: EVShield.cpp:840
+
bool motorStop(SH_Motor which_motors, SH_Next_Action next_action)
Definition: EVShield.cpp:621
+
uint8_t motorGetCommandRegA(SH_Motor which_motor)
Definition: EVShield.cpp:236
+
SH_Direction
Definition: EVShield.h:142
+
void ledHeartBeatPattern()
Definition: EVShield.cpp:872
+
uint8_t motorGetTimeToRun(SH_Motor which_motor)
Definition: EVShield.cpp:211
+
uint8_t motorGetCommandRegB(SH_Motor which_motor)
Definition: EVShield.cpp:224
+
bool motorSetSpeed(SH_Motor which_motor, int speed)
Definition: EVShield.cpp:194
+
EVShieldBank bank_a
Definition: EVShield.h:684
+
bool sensorSetType(uint8_t which_sensor, uint8_t sensor_type)
Definition: EVShield.cpp:635
+
int sensorReadRaw(uint8_t which_sensor)
Definition: EVShield.cpp:661
+
uint8_t motorGetTasksRunningByte(SH_Motor which_motor)
Definition: EVShield.cpp:257
+
uint8_t motorWaitUntilTimeDone(SH_Motor which_motors)
Definition: EVShield.cpp:445
+
bool motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
Definition: EVShield.cpp:274
+
uint8_t motorIsTimeDone(SH_Motor which_motors)
Definition: EVShield.cpp:413
+
int nxshieldGetBatteryVoltage()
Definition: EVShield.cpp:160
+
uint8_t EVShieldIssueCommand(char command)
Definition: EVShield.cpp:173
+
bool motorSetCommandRegB(SH_Motor which_motor, uint8_t value)
Definition: EVShield.cpp:219
+
#define SH_Bank_B
Definition: EVShield.h:185
+
EVShieldBankB bank_b
Definition: EVShield.h:687
+
Definition: EVShield.h:125
+
EVShield(uint8_t i2c_address_a=SH_Bank_A, uint8_t i2c_address_b=SH_Bank_B)
Definition: EVShield.cpp:59
+
uint8_t motorRunTachometer(SH_Motor which_motors, SH_Direction direction, int speed, long tachometer, SH_Move relative, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
Definition: EVShield.cpp:552
+
bool motorSetCommandRegA(SH_Motor which_motor, uint8_t value)
Definition: EVShield.cpp:231
+
uint8_t m_protocol
Definition: EVShield.h:681
+
bool format_bin(uint8_t i, char *s)
Definition: EVShield.cpp:42
+
EVShieldBankB(uint8_t i2c_address_b=SH_Bank_B)
Definition: EVShield.cpp:132
+
bool motorReset()
Definition: EVShield.cpp:326
+
int sensorReadRaw(uint8_t which_sensor)
Definition: EVShield.cpp:702
+
bool motorResetEncoder(SH_Motor which_motor)
Definition: EVShield.cpp:338
+
SH_Protocols
Protocols supported by EVShield.
Definition: SHDefines.h:60
+
This class defines methods for the EVShield Bank(s).
Definition: EVShield.h:287
+
uint8_t motorRunRotations(SH_Motor which_motors, SH_Direction direction, int speed, long rotations, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
Definition: EVShield.cpp:606
+
Definition: EVShield.h:159
+
SH_Next_Action
Definition: EVShield.h:133
+
SH_Completion_Wait
Definition: EVShield.h:158
+
void I2CTimer()
Definition: EVShield.cpp:114
+
void motorRunUnlimited(SH_Motor which_motors, SH_Direction direction, int speed)
Definition: EVShield.cpp:521
+
uint8_t motorGetStatusByte(SH_Motor which_motor)
Definition: EVShield.cpp:250
+
Definition: EVShield.h:126
+
int evshieldGetBatteryVoltage()
Definition: EVShield.cpp:165
+
Definition: EVShield.h:136
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
uint8_t motorWaitUntilTachoDone(SH_Motor which_motors)
Definition: EVShield.cpp:489
+
bool motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
Definition: EVShield.cpp:265
+
Definition: EVShield.h:135
+
SH_Motor
Definition: EVShield.h:124
+
#define SH_Bank_A
Definition: EVShield.h:180
+ +
Definition: EVShield.h:152
+
bool motorSetPassCount(uint8_t pass_count)
Definition: EVShield.cpp:310
+
Definition: EVShield.h:151
+
Definition: EVShield.h:160
+
void ledSetRGB(uint8_t red=0, uint8_t green=0, uint8_t blue=0)
Definition: EVShield.cpp:864
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
uint8_t motorRunSeconds(SH_Motor which_motors, SH_Direction direction, int speed, uint8_t duration, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
Definition: EVShield.cpp:532
+
void waitForButtonPress(uint8_t btn, uint8_t led_pattern=0)
Definition: EVShield.cpp:823
+
EVShieldBank(uint8_t i2c_address=SH_Bank_A)
Definition: EVShield.cpp:138
+
Definition: EVShield.h:143
+
bool motorSetTolerance(uint8_t tolerance)
Definition: EVShield.cpp:317
+
SH_Move
Definition: EVShield.h:150
+
void initLEDTimers()
Definition: EVShield.cpp:121
+
EVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods...
Definition: EVShield.h:648
+
bool motorSetEncoderTarget(SH_Motor which_motor, long target)
Definition: EVShield.cpp:180
+
Definition: EVShield.h:144
+
void init(SH_Protocols protocol=SH_HardwareI2C)
Definition: EVShield.cpp:65
+
bool motorStartBothInSync()
Definition: EVShield.cpp:332
+
uint8_t motorIsTachoDone(SH_Motor which_motors)
Definition: EVShield.cpp:458
+
bool getButtonState(uint8_t btn)
Definition: EVShield.cpp:816
+
long motorGetEncoderTarget(SH_Motor which_motor)
Definition: EVShield.cpp:186
+
int32_t motorGetEncoderPosition(SH_Motor which_motor)
Definition: EVShield.cpp:243
+
uint8_t motorRunDegrees(SH_Motor which_motors, SH_Direction direction, int speed, long degrees, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
Definition: EVShield.cpp:593
+
bool motorSetSpeedTimeAndControl(SH_Motor which_motors, int speed, uint8_t duration, uint8_t control)
Definition: EVShield.cpp:347
+
Definition: EVShield.h:127
+
+
+ + + + diff --git a/html/_e_v_shield_a_g_s_8h_source.html b/html/_e_v_shield_a_g_s_8h_source.html new file mode 100644 index 0000000..cc26077 --- /dev/null +++ b/html/_e_v_shield_a_g_s_8h_source.html @@ -0,0 +1,183 @@ + + + + + + +EVShield: EVShieldAGS.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldAGS.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  12/18/2014 Nitin Patil -- modified to work with EVshield
+
6  *
+
7  * This file is part of EVShield interface library.
+
8  This library is free software; you can redistribute it and/or
+
9  modify it under the terms of the GNU Lesser General Public
+
10  License as published by the Free Software Foundation; either
+
11  version 2.1 of the License, or (at your option) any later version.
+
12 
+
13  This library is distributed in the hope that it will be useful,
+
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
16  Lesser General Public License for more details.
+
17 
+
18  You should have received a copy of the GNU Lesser General Public
+
19  License along with this library; if not, write to the Free Software
+
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
21 */
+
22 
+
23 #ifndef EVShieldAGS_H
+
24 #define EVShieldAGS_H
+
25 
+
26 #include "SHDefines.h"
+
27 #include "EVShield.h"
+
28 
+ +
33 {
+
34 public:
+ +
37 
+ +
40 
+
42  EVShieldAGS();
+
43 
+
45  EVShieldAGS(EVShield * shield, SH_BankPort bp);
+
46 
+
48  bool setType(uint8_t type);
+
49 
+
51  int readRaw();
+
52 
+
54  bool init(EVShield * shield, SH_BankPort bp);
+
55 
+
56 };
+
57 
+
58 
+
59 #endif
+
60 
+
EVShield Analog Sensor class.
Definition: EVShieldAGS.h:32
+
bool setType(uint8_t type)
Definition: EVShieldAGS.cpp:32
+
EVShieldAGS()
Definition: EVShieldAGS.cpp:21
+ +
int readRaw()
Definition: EVShieldAGS.cpp:51
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVShieldAGS.cpp:71
+
SH_BankPort m_bp
Definition: EVShieldAGS.h:39
+
EVShield * mp_shield
Definition: EVShieldAGS.h:36
+
SH_BankPort
Definition: SHDefines.h:49
+ +
+
+ + + + diff --git a/html/_e_v_shield_i2_c_8h_source.html b/html/_e_v_shield_i2_c_8h_source.html new file mode 100644 index 0000000..8fa0f9f --- /dev/null +++ b/html/_e_v_shield_i2_c_8h_source.html @@ -0,0 +1,227 @@ + + + + + + +EVShield: EVShieldI2C.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldI2C.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 #ifndef EVShieldI2C_H
+
23 #define EVShieldI2C_H
+
24 
+
25 #include "SHDefines.h"
+
26 #include "BaseI2CDevice.h"
+
27 #include "SoftI2cMaster.h"
+
28 
+
32 class EVShieldI2C : public BaseI2CDevice, public SoftI2cMaster
+
33 {
+
34 public:
+
37  void * mp_shield;
+
40  uint8_t *_i2c_buffer;
+
41 
+
42 public:
+
44  EVShieldI2C(uint8_t i2c_address);
+
45 
+
47  uint8_t m_protocol;
+
48 
+
50  void init(void * shield, SH_BankPort bp);
+
51 
+
56  uint8_t readByte (uint8_t location);
+
57 
+
62  uint16_t readInteger (uint8_t location);
+
63 
+
68  uint32_t readLong (uint8_t location);
+
69 
+
76  uint8_t* readRegisters (uint8_t start_register, uint8_t bytes, uint8_t* buf);
+
77 
+
85  char* readString (uint8_t location, uint8_t bytes_to_read,
+
86  uint8_t* buffer = 0, uint8_t buffer_length = 0);
+
87 
+
93  bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write,
+
94  uint8_t* buffer = 0);
+
95 
+
100  bool writeByte (uint8_t location, uint8_t data);
+
101 
+
106  bool writeInteger(uint8_t location, uint16_t data);
+
107 
+
112  bool writeLong (uint8_t location, uint32_t data);
+
113 
+
115  char* getFirmwareVersion();
+
116 
+
118  char* getVendorID();
+
119 
+
121  char* getDeviceID();
+
122 
+
124  char* getFeatureSet();
+
125 
+
127  uint8_t getErrorCode();
+
128 
+
129  bool checkAddress();
+
130 
+
134  bool setAddress(uint8_t address);
+
135 
+
136 };
+
137 
+
138 
+
139 #endif
+
140 
+
This class implements software i2c interface used by EVShield/NXShield on Arduino.
Definition: SoftI2cMaster.h:40
+
bool writeInteger(uint8_t location, uint16_t data)
Definition: EVShieldI2C.cpp:84
+
char * getVendorID()
Definition: EVShieldI2C.cpp:125
+
void * mp_shield
Definition: EVShieldI2C.h:37
+
char * getFeatureSet()
Definition: EVShieldI2C.cpp:137
+
uint8_t readByte(uint8_t location)
Definition: EVShieldI2C.cpp:31
+
uint8_t * _i2c_buffer
Definition: EVShieldI2C.h:40
+
uint8_t m_protocol
Definition: EVShieldI2C.h:47
+
uint32_t readLong(uint8_t location)
Definition: EVShieldI2C.cpp:45
+
char * getFirmwareVersion()
Definition: EVShieldI2C.cpp:119
+
void init(void *shield, SH_BankPort bp)
Definition: EVShieldI2C.cpp:142
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
uint8_t * readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)
Definition: EVShieldI2C.cpp:52
+ +
char * readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
Definition: EVShieldI2C.cpp:59
+
bool writeByte(uint8_t location, uint8_t data)
Definition: EVShieldI2C.cpp:73
+
bool writeLong(uint8_t location, uint32_t data)
Definition: EVShieldI2C.cpp:90
+
bool writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
Definition: EVShieldI2C.cpp:67
+
EVShieldI2C(uint8_t i2c_address)
Definition: EVShieldI2C.cpp:26
+
uint16_t readInteger(uint8_t location)
Definition: EVShieldI2C.cpp:38
+
SH_BankPort
Definition: SHDefines.h:49
+
char * getDeviceID()
Definition: EVShieldI2C.cpp:131
+
uint8_t getErrorCode()
Definition: EVShieldI2C.cpp:96
+
bool setAddress(uint8_t address)
Definition: EVShieldI2C.cpp:108
+
This class implements hardware I2C protocol used by EVShield/NXShield on an Arduino.
Definition: BaseI2CDevice.h:94
+
+
+ + + + diff --git a/html/_e_v_shield_u_a_r_t_8h_source.html b/html/_e_v_shield_u_a_r_t_8h_source.html new file mode 100644 index 0000000..a511279 --- /dev/null +++ b/html/_e_v_shield_u_a_r_t_8h_source.html @@ -0,0 +1,202 @@ + + + + + + +EVShield: EVShieldUART.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldUART.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef EVShieldUART_H
+
22 #define EVShieldUART_H
+
23 
+
24 
+
25 #include "SHDefines.h"
+
26 #include "EVShield.h"
+
27 
+ +
33 {
+
34  public:
+ +
37 
+ +
40 
+
43  int m_offset;
+
44 
+
46  EVShieldUART();
+
47 
+
49  EVShieldUART(EVShield * shield, SH_BankPort bp);
+
50 
+
52  uint8_t getMode( );
+
53 
+
55  bool setType(uint8_t type);
+
56 
+
58  bool writeLocation(uint8_t loc, uint8_t data);
+
59 
+
61  int16_t readLocationInt(uint8_t loc);
+
62 
+
64  uint8_t readLocationByte(uint8_t loc);
+
65 
+
67  bool init(EVShield * shield, SH_BankPort bp);
+
68 
+
70  uint8_t setMode(char newMode);
+
71 
+
73  uint16_t readValue();
+
74 
+
76  bool readAndPrint(uint8_t loc, uint8_t len);
+
77 };
+
78 
+
79 
+
80 #endif
+
81 
+
EVShieldUART()
Definition: EVShieldUART.cpp:24
+
uint8_t readLocationByte(uint8_t loc)
Definition: EVShieldUART.cpp:97
+
bool readAndPrint(uint8_t loc, uint8_t len)
Definition: EVShieldUART.cpp:157
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
int m_offset
Definition: EVShieldUART.h:43
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVShieldUART.cpp:113
+
uint8_t setMode(char newMode)
Definition: EVShieldUART.cpp:144
+ +
EVShield * mp_shield
Definition: EVShieldUART.h:36
+
SH_BankPort m_bp
Definition: EVShieldUART.h:39
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
uint16_t readValue()
Definition: EVShieldUART.cpp:167
+
bool setType(uint8_t type)
Definition: EVShieldUART.cpp:46
+
SH_BankPort
Definition: SHDefines.h:49
+
bool writeLocation(uint8_t loc, uint8_t data)
Definition: EVShieldUART.cpp:65
+
int16_t readLocationInt(uint8_t loc)
Definition: EVShieldUART.cpp:81
+ +
uint8_t getMode()
Definition: EVShieldUART.cpp:130
+
+
+ + + + diff --git a/html/_e_vs___absolute_i_m_u_8h_source.html b/html/_e_vs___absolute_i_m_u_8h_source.html new file mode 100644 index 0000000..e95d3d0 --- /dev/null +++ b/html/_e_vs___absolute_i_m_u_8h_source.html @@ -0,0 +1,280 @@ + + + + + + +EVShield: EVs_AbsoluteIMU.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_AbsoluteIMU.h
+
+
+
1 
+
2 // EVs_AbsoluteIMU.h
+
3 //
+
4 // This is a class for reading from AbsoluteIMU, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=169
+
6 
+
7 // Initial version: 2013-01-22 by Michael Giles
+
8 // Modified for EVShield: 2015-2-16 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.Deepak Patil
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_AbsoluteIMU_H
+
30 #define EVs_AbsoluteIMU_H
+
31 
+
36 #define IMU_Command 0x41
+
37 
+
38 #include "EVShieldI2C.h"
+
39 
+ +
45 {
+
46  short mx_h;
+
47  short mx_l;
+
48  short my_h;
+
49  short my_l;
+
50  short mz_h;
+
51  short mz_l;
+
53  int mx;
+
54  int my;
+
55  int mz;
+
56  int error;
+
57 };
+
58 
+
63 struct gyro
+
64 {
+
65  short gx_h;
+
66  short gx_l;
+
67  short gy_h;
+
68  short gy_l;
+
69  short gz_h;
+
70  short gz_l;
+
72  int gx;
+
73  int gy;
+
74  int gz;
+
75  int error;
+
76 };
+
77 
+
82 struct accl
+
83 {
+
84  short tx;
+
85  short ty;
+
86  short tz;
+
88  short ax_h;
+
89  short ax_l;
+
90  short ay_h;
+
91  short ay_l;
+
92  short az_h;
+
93  short az_l;
+
95  int ax;
+
96  int ay;
+
97  int az;
+
98  int error;
+
99 };
+
100 
+
105 struct cmps
+
106 {
+
107  int heading;
+
109  short heading_h;
+
110  short heading_l;
+
112  int error;
+
113 };
+
114 
+ +
119 {
+
120 public:
+
122  EVs_AbsoluteIMU(uint8_t i2c_address = 0x22);
+
123 
+
125  uint8_t issueCommand(char command);
+
126 
+
131  void readGyro(gyro & currGyro);
+
132 
+
137  void readCompass(cmps & currCompass);
+
138 
+
143  void readAccelerometer(accl & currAccelerometer);
+
144 
+
149  void readMagneticField(magnetic_field & currMagnetic_field);
+ +
157  bool endCompassCalibration();
+
158 };
+
159 
+
160 #endif
+
short heading_h
Definition: EVs_AbsoluteIMU.h:109
+
Definition: EVs_AbsoluteIMU.h:63
+
int ax
Definition: EVs_AbsoluteIMU.h:95
+
int gz
Definition: EVs_AbsoluteIMU.h:74
+
short gx_l
Definition: EVs_AbsoluteIMU.h:66
+
int error
Definition: EVs_AbsoluteIMU.h:98
+
short gy_l
Definition: EVs_AbsoluteIMU.h:68
+
Definition: EVs_AbsoluteIMU.h:105
+
short ax_h
Definition: EVs_AbsoluteIMU.h:88
+
int mz
Definition: EVs_AbsoluteIMU.h:55
+
int gx
Definition: EVs_AbsoluteIMU.h:72
+
This class interfaces with AbsoluteIMU sensor attached to EVShield.
Definition: EVs_AbsoluteIMU.h:118
+
short gy_h
Definition: EVs_AbsoluteIMU.h:67
+
int heading
Definition: EVs_AbsoluteIMU.h:107
+
short tx
Definition: EVs_AbsoluteIMU.h:84
+
short ay_l
Definition: EVs_AbsoluteIMU.h:91
+
EVs_AbsoluteIMU(uint8_t i2c_address=0x22)
Definition: EVs_AbsoluteIMU.cpp:30
+
int az
Definition: EVs_AbsoluteIMU.h:97
+
Definition: EVs_AbsoluteIMU.h:82
+
int my
Definition: EVs_AbsoluteIMU.h:54
+
short mz_l
Definition: EVs_AbsoluteIMU.h:51
+
int gy
Definition: EVs_AbsoluteIMU.h:73
+
short ay_h
Definition: EVs_AbsoluteIMU.h:90
+
uint8_t issueCommand(char command)
Definition: EVs_AbsoluteIMU.cpp:36
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
short my_h
Definition: EVs_AbsoluteIMU.h:48
+
bool beginCompassCalibration()
Definition: EVs_AbsoluteIMU.cpp:82
+
Definition: EVs_AbsoluteIMU.h:44
+
short mz_h
Definition: EVs_AbsoluteIMU.h:50
+
void readMagneticField(magnetic_field &currMagnetic_field)
Definition: EVs_AbsoluteIMU.cpp:72
+
short heading_l
Definition: EVs_AbsoluteIMU.h:110
+
bool endCompassCalibration()
Definition: EVs_AbsoluteIMU.cpp:86
+
short ty
Definition: EVs_AbsoluteIMU.h:85
+
int error
Definition: EVs_AbsoluteIMU.h:56
+
short tz
Definition: EVs_AbsoluteIMU.h:86
+
int ay
Definition: EVs_AbsoluteIMU.h:96
+
int mx
Definition: EVs_AbsoluteIMU.h:53
+
short gx_h
Definition: EVs_AbsoluteIMU.h:65
+
int error
Definition: EVs_AbsoluteIMU.h:75
+
void readAccelerometer(accl &currAccelerometer)
Definition: EVs_AbsoluteIMU.cpp:59
+
int error
Definition: EVs_AbsoluteIMU.h:112
+
short mx_h
Definition: EVs_AbsoluteIMU.h:46
+
void readGyro(gyro &currGyro)
Definition: EVs_AbsoluteIMU.cpp:41
+
short my_l
Definition: EVs_AbsoluteIMU.h:49
+
void readCompass(cmps &currCompass)
Definition: EVs_AbsoluteIMU.cpp:52
+
short az_l
Definition: EVs_AbsoluteIMU.h:93
+
short mx_l
Definition: EVs_AbsoluteIMU.h:47
+
short ax_l
Definition: EVs_AbsoluteIMU.h:89
+
short gz_h
Definition: EVs_AbsoluteIMU.h:69
+
short gz_l
Definition: EVs_AbsoluteIMU.h:70
+
short az_h
Definition: EVs_AbsoluteIMU.h:92
+
+
+ + + + diff --git a/html/_e_vs___angle_sensor_8h_source.html b/html/_e_vs___angle_sensor_8h_source.html new file mode 100644 index 0000000..9d08100 --- /dev/null +++ b/html/_e_vs___angle_sensor_8h_source.html @@ -0,0 +1,181 @@ + + + + + + +EVShield: EVs_AngleSensor.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_AngleSensor.h
+
+
+
1 
+
2 // EVs_AngleSensor.h
+
3 //
+
4 // This is a class for reading from AngelSensor, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=173
+
6 
+
7 // Initial version: 2012-09-17 by Deepak Patil
+
8 // Modified for EVShield: 2015-02-16 Michael Giles
+
9 
+
10 /*
+
11  This library is free software; you can redistribute it and/or
+
12  modify it under the terms of the GNU Lesser General Public
+
13  License as published by the Free Software Foundation; either
+
14  version 2.1 of the License, or (at your option) any later version.
+
15 
+
16  This library is distributed in the hope that it will be useful,
+
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
19  Lesser General Public License for more details.
+
20 
+
21  You should have received a copy of the GNU Lesser General Public
+
22  License along with this library; if not, write to the Free Software
+
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
24 */
+
25 
+
26 
+
27 #ifndef EVs_ANGLE_SENSOR_H
+
28 #define EVs_ANGLE_SENSOR_H
+
29 
+
30 #define AS_Command 0x41
+
31 
+
32 #define ANGLE 0x42
+
33 #define RAW_READING 0x46
+
34 
+
35 #include "EVShieldI2C.h"
+
36 
+ +
42 {
+
43 public:
+
45  EVs_AngleSensor(uint8_t i2c_address = 0x30);
+
46 
+
48  uint8_t issueCommand(char command);
+
49 
+
52  long getAngle();
+
53 
+
56  long getRawReading();
+
57 
+
60  void reset();
+
61 
+
62 };
+
63 
+
64 #endif
+
long getAngle()
Definition: EVs_AngleSensor.cpp:36
+
void reset()
Definition: EVs_AngleSensor.cpp:47
+
EVs_AngleSensor(uint8_t i2c_address=0x30)
Definition: EVs_AngleSensor.cpp:29
+
uint8_t issueCommand(char command)
+
long getRawReading()
Definition: EVs_AngleSensor.cpp:41
+
This class interfaces with sensor attached to EVShield.
Definition: EVs_AngleSensor.h:41
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
+
+ + + + diff --git a/html/_e_vs___d_i_s_t_nx_8h_source.html b/html/_e_vs___d_i_s_t_nx_8h_source.html new file mode 100644 index 0000000..659dd73 --- /dev/null +++ b/html/_e_vs___d_i_s_t_nx_8h_source.html @@ -0,0 +1,191 @@ + + + + + + +EVShield: EVs_DISTNx.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_DISTNx.h
+
+
+
1 
+
2 // EVs_DISTNx.h
+
3 //
+
4 // This is a class for reading from DIST-Nx, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=73
+
6 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=72
+
7 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=69
+
8 
+
9 // Initial version: 2010-06-10 by Andrew Sylvester
+
10 // Modified for EVShield: 2015-2-16 by Michael Giles
+
11 // Large parts of the code is ported from the NXC library for the device,
+
12 // written by Deepak Patil.
+
13 
+
14 /*
+
15  This library is free software; you can redistribute it and/or
+
16  modify it under the terms of the GNU Lesser General Public
+
17  License as published by the Free Software Foundation; either
+
18  version 2.1 of the License, or (at your option) any later version.
+
19 
+
20  This library is distributed in the hope that it will be useful,
+
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
23  Lesser General Public License for more details.
+
24 
+
25  You should have received a copy of the GNU Lesser General Public
+
26  License along with this library; if not, write to the Free Software
+
27  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
28 */
+
29 
+
30 
+
31 #ifndef EVs_DISTNx_H
+
32 #define EVs_DISTNx_H
+
33 
+
34 #define DISTNx_Command 0x41
+
35 #define DISTNx_Distance 0x42
+
36 #define DISTNx_Voltage 0x44
+
37 #define DISTNx_SensorType 0x50
+
38 
+
39 #include "EVShieldI2C.h"
+
40 
+
44 class EVs_DISTNx : public EVShieldI2C
+
45 {
+
46 public:
+
48  EVs_DISTNx(uint8_t i2c_address = 0x02);
+
49 
+
51  uint8_t issueCommand(char command);
+
52 
+
54  bool energize();
+
55 
+
57  bool deEnergize();
+
58 
+
60  int getDist();
+
61 
+
63  int getVolt();
+
64 
+
66  short getType();
+
67 
+
68 };
+
69 
+
70 #endif
+
bool deEnergize()
Definition: EVs_DISTNx.cpp:48
+
short getType()
Definition: EVs_DISTNx.cpp:63
+
This class interfaces with DIST-Nx attached to EVShield.
Definition: EVs_DISTNx.h:44
+
uint8_t issueCommand(char command)
Definition: EVs_DISTNx.cpp:38
+
EVs_DISTNx(uint8_t i2c_address=0x02)
Definition: EVs_DISTNx.cpp:34
+
bool energize()
Definition: EVs_DISTNx.cpp:43
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
int getDist()
Definition: EVs_DISTNx.cpp:53
+
int getVolt()
Definition: EVs_DISTNx.cpp:58
+
+
+ + + + diff --git a/html/_e_vs___e_v3_color_8h_source.html b/html/_e_vs___e_v3_color_8h_source.html new file mode 100644 index 0000000..308dca3 --- /dev/null +++ b/html/_e_vs___e_v3_color_8h_source.html @@ -0,0 +1,169 @@ + + + + + + +EVShield: EVs_EV3Color.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Color.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19 */
+
20 
+
21 #ifndef EVs_EV3Color_H
+
22 #define EVs_EV3Color_H
+
23 
+
24 #include "EVShieldUART.h"
+
25 
+
29 typedef enum {
+
30  MODE_Color_ReflectedLight = 0x00,
+
31  MODE_Color_AmbientLight = 0x01,
+
32  MODE_Color_MeasureColor = 0x02,
+
33 } MODE_Color;
+
34 
+
38 class EVs_EV3Color : public EVShieldUART
+
39 {
+
40 public:
+
42  bool init(EVShield * shield, SH_BankPort bp);
+
43 
+
45  float getVal();
+
46 };
+
47 
+
48 #endif
+
49 
+
This class interfaces with LEGO EV3 Touch sensor attached to EVShield.
Definition: EVs_EV3Color.h:38
+
float getVal()
Definition: EVs_EV3Color.cpp:30
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
SH_BankPort
Definition: SHDefines.h:49
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Color.cpp:24
+
+
+ + + + diff --git a/html/_e_vs___e_v3_gyro_8h_source.html b/html/_e_vs___e_v3_gyro_8h_source.html new file mode 100644 index 0000000..3e522e3 --- /dev/null +++ b/html/_e_vs___e_v3_gyro_8h_source.html @@ -0,0 +1,171 @@ + + + + + + +EVShield: EVs_EV3Gyro.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Gyro.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19 */
+
20 
+
21 #ifndef EVs_EV3Gyro_H
+
22 #define EVs_EV3Gyro_H
+
23 
+
24 #include "EVShieldUART.h"
+
25 
+
29 typedef enum {
+
30  MODE_Gyro_Angle = 0x00,
+
31  MODE_Gyro_Rate = 0x01
+
33 } MODE_Gyro;
+
34 
+
38 class EVs_EV3Gyro : public EVShieldUART
+
39 {
+
40 public:
+
41  bool init(EVShield * shield, SH_BankPort bp);
+
42 
+
44  int getAngle();
+
45 
+
47  int getRefAngle();
+
48 
+
50  int setRef();
+
51 };
+
52 #endif
+
This class interfaces with LEGO EV3 Touch sensor attached to EVShield.
Definition: EVs_EV3Gyro.h:38
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
int getRefAngle()
Definition: EVs_EV3Gyro.cpp:37
+
int setRef()
Definition: EVs_EV3Gyro.cpp:43
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
SH_BankPort
Definition: SHDefines.h:49
+
int getAngle()
Definition: EVs_EV3Gyro.cpp:32
+
+
+ + + + diff --git a/html/_e_vs___e_v3_infrared_8h_source.html b/html/_e_vs___e_v3_infrared_8h_source.html new file mode 100644 index 0000000..74eaa38 --- /dev/null +++ b/html/_e_vs___e_v3_infrared_8h_source.html @@ -0,0 +1,177 @@ + + + + + + +EVShield: EVs_EV3Infrared.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Infrared.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19 */
+
20 
+
21 #ifndef EVs_EV3Infrared_H
+
22 #define EVs_EV3Infrared_H
+
23 
+
24 #include "EVShieldUART.h"
+
25 
+
29 typedef enum {
+
30  MODE_Infrared_Proximity = 0x00,
+
31  MODE_Infrared_Beacon = 0x01,
+
32  MODE_Infrared_Remote = 0x02
+
34 } MODE_Infrared;
+
35 
+ +
40 {
+
41 public:
+
43  bool init(EVShield * shield, SH_BankPort bp);
+
44 
+
45 
+
47  uint16_t readProximity();
+
48 
+
50 int8_t readChannelHeading(uint8_t channel);
+
51  uint8_t readChannelProximity(uint8_t channel);
+
52 
+
54  uint8_t readChannelButton(uint8_t channel);
+
55 };
+
56 
+
57 #endif
+
58 
+
uint8_t readChannelButton(uint8_t channel)
Definition: EVs_EV3Infrared.cpp:47
+
uint16_t readProximity()
Definition: EVs_EV3Infrared.cpp:30
+
int8_t readChannelHeading(uint8_t channel)
Definition: EVs_EV3Infrared.cpp:35
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
This class interfaces with LEGO EV3 Touch sensor attached to EVShield.
Definition: EVs_EV3Infrared.h:39
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Infrared.cpp:24
+
SH_BankPort
Definition: SHDefines.h:49
+
+
+ + + + diff --git a/html/_e_vs___e_v3_touch_8h_source.html b/html/_e_vs___e_v3_touch_8h_source.html new file mode 100644 index 0000000..9e9daf3 --- /dev/null +++ b/html/_e_vs___e_v3_touch_8h_source.html @@ -0,0 +1,170 @@ + + + + + + +EVShield: EVs_EV3Touch.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Touch.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 #ifndef EVs_EV3Touch_H
+
23 #define EVs_EV3Touch_H
+
24 
+
25 #include "EVShieldUART.h"
+
26 
+
30 class EVs_EV3Touch : public EVShieldUART
+
31 {
+
32 public:
+
34  bool init(EVShield * shield, SH_BankPort bp);
+
35 
+
37  bool isPressed();
+
38 
+
49  int getBumpCount();
+
50 
+
52  bool resetBumpCount();
+
53 };
+
54 
+
55 #endif
+
56 
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
int getBumpCount()
Definition: EVs_EV3Touch.cpp:35
+
This class interfaces with LEGO EV3 Touch sensor attached to EVShield.
Definition: EVs_EV3Touch.h:30
+
bool isPressed()
Definition: EVs_EV3Touch.cpp:30
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
bool resetBumpCount()
Definition: EVs_EV3Touch.cpp:40
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Touch.cpp:24
+
SH_BankPort
Definition: SHDefines.h:49
+
+
+ + + + diff --git a/html/_e_vs___e_v3_ultrasonic_8h_source.html b/html/_e_vs___e_v3_ultrasonic_8h_source.html new file mode 100644 index 0000000..b87b836 --- /dev/null +++ b/html/_e_vs___e_v3_ultrasonic_8h_source.html @@ -0,0 +1,172 @@ + + + + + + +EVShield: EVs_EV3Ultrasonic.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Ultrasonic.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19 */
+
20 
+
21 #ifndef EVs_EV3Ultrasonic_H
+
22 #define EVs_EV3Ultrasonic_H
+
23 
+
24 #include "EVShieldUART.h"
+
25 
+
29 typedef enum {
+
30  MODE_Sonar_CM = 0x00,
+
31  MODE_Sonar_Inches = 0x01,
+
32  MODE_Sonar_Presence = 0x02,
+
33 } MODE_Sonar;
+
34 
+ +
39 {
+
40 public:
+
42  bool init(EVShield * shield, SH_BankPort bp);
+
43 
+
45  float getDist();
+
46 
+
48  uint8_t detect();
+
49 };
+
50 
+
51 #endif
+
52 
+
uint8_t detect()
Definition: EVs_EV3Ultrasonic.cpp:39
+
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
+
This class interfaces with LEGO EV3 Touch sensor attached to EVShield.
Definition: EVs_EV3Ultrasonic.h:38
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Ultrasonic.cpp:24
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
SH_BankPort
Definition: SHDefines.h:49
+
float getDist()
Definition: EVs_EV3Ultrasonic.cpp:30
+
+
+ + + + diff --git a/html/_e_vs___light_sensor_array_8h_source.html b/html/_e_vs___light_sensor_array_8h_source.html new file mode 100644 index 0000000..9182f57 --- /dev/null +++ b/html/_e_vs___light_sensor_array_8h_source.html @@ -0,0 +1,218 @@ + + + + + + +EVShield: EVs_LightSensorArray.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_LightSensorArray.h
+
+
+
1 
+
2 // EVs_LightSensorArray.h
+
3 //
+
4 // This is a class for reading from LightSensorArray made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=168
+
6 
+
7 // Initial version: 2013-01-25 by Michael Giles
+
8 // Modified for EVShield: 2015-02-16 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_LightSensorArray_H
+
30 #define EVs_LightSensorArray_H
+
31 
+
32 #define LightSensorArray_Calibrated 0x42
+
33 #define LightSensorArray_Uncalibrated 0x6A
+
34 #define LightSensorArray_White_Limit 0x4A
+
35 #define LightSensorArray_Black_Limit 0x52
+
36 #define LightSensorArray_White_Calibration 0x5A
+
37 #define LightSensorArray_Black_Calibration 0x62
+
38 
+
39 #define LightSensorArray_Command 0x41
+
40 
+
41 #include "EVShieldI2C.h"
+
42 
+
43 
+ +
47 {
+
48 public:
+
50  EVs_LightSensorArray(uint8_t i2c_address = 0x02);
+
51 
+
53  uint8_t issueCommand(char command);
+
54 
+
56  bool calibrateWhite();
+
57 
+
59  bool calibrateBlack();
+
60 
+
62  bool sleep();
+
63 
+
65  bool wakeUp();
+
66 
+
68  bool configureUS();
+
69 
+
71  bool configureEurope();
+
72 
+
74  bool configureUniversal();
+
75 
+
78  uint8_t* getCalibrated();
+
79 
+
82  uint8_t* getUncalibrated();
+
83 
+
85  uint8_t* getWhiteLimit();
+
86 
+
88  uint8_t* getBlackLimit();
+
89 
+
92  uint8_t* getWhiteCalibration();
+
93 
+
96  uint8_t* getBlackCalibration();
+
97 
+
98 };
+
99 
+
100 #endif
+
uint8_t * getBlackLimit()
Definition: EVs_LightSensorArray.cpp:92
+
bool calibrateWhite()
Definition: EVs_LightSensorArray.cpp:42
+
uint8_t * getBlackCalibration()
Definition: EVs_LightSensorArray.cpp:102
+
uint8_t issueCommand(char command)
Definition: EVs_LightSensorArray.cpp:37
+
uint8_t * getUncalibrated()
Definition: EVs_LightSensorArray.cpp:82
+
bool configureEurope()
Definition: EVs_LightSensorArray.cpp:67
+
EVs_LightSensorArray(uint8_t i2c_address=0x02)
Definition: EVs_LightSensorArray.cpp:32
+
bool sleep()
Definition: EVs_LightSensorArray.cpp:52
+
bool wakeUp()
Definition: EVs_LightSensorArray.cpp:57
+
uint8_t * getCalibrated()
Definition: EVs_LightSensorArray.cpp:77
+
This class interfaces with LightSensorArray attached to EVShield.
Definition: EVs_LightSensorArray.h:46
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
uint8_t * getWhiteLimit()
Definition: EVs_LightSensorArray.cpp:87
+
bool configureUS()
Definition: EVs_LightSensorArray.cpp:62
+
bool calibrateBlack()
Definition: EVs_LightSensorArray.cpp:47
+
bool configureUniversal()
Definition: EVs_LightSensorArray.cpp:72
+
uint8_t * getWhiteCalibration()
Definition: EVs_LightSensorArray.cpp:97
+
+
+ + + + diff --git a/html/_e_vs___line_leader_8h_source.html b/html/_e_vs___line_leader_8h_source.html new file mode 100644 index 0000000..4de1486 --- /dev/null +++ b/html/_e_vs___line_leader_8h_source.html @@ -0,0 +1,288 @@ + + + + + + +EVShield: EVs_LineLeader.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_LineLeader.h
+
+
+
1 
+
2 // EVs_LineLeader.h
+
3 //
+
4 // This is a class for reading from LineLeader Sensor made by Openelectrons.com.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=111
+
6 
+
7 // Initial version: 2010-06-15 by Andrew Sylvester
+
8 // Modified for EVShield: 2015-02-16 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_LineLeader_H
+
30 #define EVs_LineLeader_H
+
31 
+
32 #define LineLeader_Raw_Calibrated 0x49
+
33 #define LineLeader_Raw_Uncalibrated 0x74
+
34 #define LineLeader_White_Limit 0x51
+
35 #define LineLeader_Black_Limit 0x59
+
36 #define LineLeader_White_Calibration 0x64
+
37 #define LineLeader_Black_Calibration 0x6C
+
38 
+
39 
+
40 #define LineLeader_Command 0x41
+
41 #define LineLeader_Steering 0x42
+
42 #define LineLeader_Average 0x43
+
43 #define LineLeader_Result 0x44
+
44 #define LineLeader_SetPoint 0x45
+
45 #define LineLeader_Kp 0x46
+
46 #define LineLeader_Ki 0x47
+
47 #define LineLeader_Kd 0x48
+
48 #define LineLeader_Kp_Factor 0x61
+
49 #define LineLeader_Ki_Factor 0x62
+
50 #define LineLeader_Kd_Factor 0x63
+
51 
+
52 #include "EVShieldI2C.h"
+
53 
+ +
58 {
+
59 public:
+
61  EVs_LineLeader(uint8_t i2c_address = 0x02);
+
62 
+
64  uint8_t issueCommand(char command);
+
65 
+
67  bool calibrateWhite();
+
68 
+
70  bool calibrateBlack();
+
71 
+
73  bool sleep();
+
74 
+
76  bool wakeUp();
+
77 
+ +
81 
+
84  bool resetColorInversion();
+
85 
+
89  bool takeSnapshot();
+
90 
+
93  bool configureUS();
+
94 
+
97  bool configureEurope();
+
98 
+
101  bool configureUniversal();
+
102 
+
104  uint8_t getSetPoint();
+
105 
+
107  bool setSetPoint(uint8_t spoint);
+
108 
+
110  uint8_t getKp(uint8_t kp);
+
111 
+
113  bool setKp(uint8_t kp);
+
114 
+
116  uint8_t getKi(uint8_t ki);
+
117 
+
119  bool setKi(uint8_t ki);
+
120 
+
122  uint8_t getKd(uint8_t kd);
+
123 
+
125  bool setKd(uint8_t kd);
+
126 
+
131  uint8_t getKpFactor(uint8_t kpfact);
+
132 
+
136  bool setKpFactor(uint8_t kpfact);
+
137 
+
142  uint8_t getKiFactor(uint8_t kifact);
+
143 
+
147  bool setKiFactor(uint8_t kifact);
+
148 
+
153  uint8_t getKdFactor(uint8_t kdfact);
+
154 
+
158  bool setKdFactor(uint8_t kdfact);
+
159 
+
161  int getSteering();
+
162 
+
164  unsigned char getAverage();
+
165 
+
167  unsigned char getResult();
+
168 
+
173  uint8_t* getRawCalibrated();
+
174 
+
178  uint8_t* getRawUncalibrated();
+
179 
+
181  uint8_t* getWhiteLimit();
+
182 
+
184  uint8_t* getBlackLimit();
+
185 
+
187  uint8_t* getWhiteCalibration();
+
188 
+
190  uint8_t* getBlackCalibration();
+
191 
+
192 };
+
193 
+
194 #endif /* LineLeader_H_ */
+
bool configureEurope()
Definition: EVs_LineLeader.cpp:82
+
uint8_t getKp(uint8_t kp)
Definition: EVs_LineLeader.cpp:102
+
bool configureUniversal()
Definition: EVs_LineLeader.cpp:87
+
bool calibrateWhite()
Definition: EVs_LineLeader.cpp:42
+
bool setKd(uint8_t kd)
Definition: EVs_LineLeader.cpp:127
+
bool sleep()
Definition: EVs_LineLeader.cpp:52
+
uint8_t * getBlackCalibration()
Definition: EVs_LineLeader.cpp:202
+
unsigned char getResult()
Definition: EVs_LineLeader.cpp:172
+
uint8_t getKdFactor(uint8_t kdfact)
Definition: EVs_LineLeader.cpp:152
+
bool setKp(uint8_t kp)
Definition: EVs_LineLeader.cpp:107
+
bool takeSnapshot()
Definition: EVs_LineLeader.cpp:72
+
uint8_t getKi(uint8_t ki)
Definition: EVs_LineLeader.cpp:112
+
uint8_t * getRawUncalibrated()
Definition: EVs_LineLeader.cpp:182
+
uint8_t issueCommand(char command)
Definition: EVs_LineLeader.cpp:37
+
uint8_t getKd(uint8_t kd)
Definition: EVs_LineLeader.cpp:122
+
bool wakeUp()
Definition: EVs_LineLeader.cpp:57
+
unsigned char getAverage()
Definition: EVs_LineLeader.cpp:167
+
int getSteering()
Definition: EVs_LineLeader.cpp:162
+
uint8_t * getWhiteCalibration()
Definition: EVs_LineLeader.cpp:197
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
bool invertLineColorToWhite()
Definition: EVs_LineLeader.cpp:62
+
uint8_t * getRawCalibrated()
Definition: EVs_LineLeader.cpp:177
+
bool setKpFactor(uint8_t kpfact)
Definition: EVs_LineLeader.cpp:137
+
uint8_t getKpFactor(uint8_t kpfact)
Definition: EVs_LineLeader.cpp:132
+
bool resetColorInversion()
Definition: EVs_LineLeader.cpp:67
+
bool setKiFactor(uint8_t kifact)
Definition: EVs_LineLeader.cpp:147
+
EVs_LineLeader(uint8_t i2c_address=0x02)
Definition: EVs_LineLeader.cpp:32
+
bool setKi(uint8_t ki)
Definition: EVs_LineLeader.cpp:117
+
uint8_t * getWhiteLimit()
Definition: EVs_LineLeader.cpp:187
+
uint8_t * getBlackLimit()
Definition: EVs_LineLeader.cpp:192
+
uint8_t getKiFactor(uint8_t kifact)
Definition: EVs_LineLeader.cpp:142
+
uint8_t getSetPoint()
Definition: EVs_LineLeader.cpp:92
+
bool calibrateBlack()
Definition: EVs_LineLeader.cpp:47
+
This class interfaces with NXTLineLeader sensor attached to EVShield.
Definition: EVs_LineLeader.h:57
+
bool configureUS()
Definition: EVs_LineLeader.cpp:77
+
bool setSetPoint(uint8_t spoint)
Definition: EVs_LineLeader.cpp:97
+
bool setKdFactor(uint8_t kdfact)
Definition: EVs_LineLeader.cpp:157
+
+
+ + + + diff --git a/html/_e_vs___magic_wand_8h_source.html b/html/_e_vs___magic_wand_8h_source.html new file mode 100644 index 0000000..df141f7 --- /dev/null +++ b/html/_e_vs___magic_wand_8h_source.html @@ -0,0 +1,163 @@ + + + + + + +EVShield: EVs_MagicWand.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_MagicWand.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 #ifndef EVs_MagicWand_H
+
23 #define EVs_MagicWand_H
+
24 #include "EVShieldI2C.h"
+
25 
+
26 #define MagicWand_WR_Register 0x00
+
27 
+
31 class EVs_MagicWand : public EVShieldI2C
+
32 {
+
33 
+
34 public:
+
36  EVs_MagicWand(uint8_t devAddr = 0x70);
+
37 
+
39  void lightWand(uint8_t byteToWrite);
+
40 };
+
41 
+
42 #endif
+
void lightWand(uint8_t byteToWrite)
Definition: EVs_MagicWand.cpp:29
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
This class interfaces with Magic Wand attached to EVShield.
Definition: EVs_MagicWand.h:31
+
EVs_MagicWand(uint8_t devAddr=0x70)
Definition: EVs_MagicWand.cpp:24
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_cam_8h_source.html b/html/_e_vs___n_x_t_cam_8h_source.html new file mode 100644 index 0000000..8d2fa9e --- /dev/null +++ b/html/_e_vs___n_x_t_cam_8h_source.html @@ -0,0 +1,229 @@ + + + + + + +EVShield: EVs_NXTCam.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTCam.h
+
+
+
1 
+
2 // EVs_NXTCam.h
+
3 //
+
4 // This is a class for controlling the NXT Cam, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=78 .
+
6 
+
7 // Initial version: 2010-06-18 by Andrew Sylvester
+
8 // Modified for EVShield: 2015-02-15 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_NXTCam_H
+
30 #define EVs_NXTCam_H
+
31 
+
32 #define Cam_Command 0x41
+
33 #define Cam_Number_Objects 0x42
+
34 #define Start_Reg 0x43
+
35 
+
36 #include "EVShieldI2C.h"
+
37 
+
41 class EVs_NXTCam : public EVShieldI2C
+
42 {
+
43 public:
+
45  EVs_NXTCam(uint8_t i2c_address = 0x02);
+
46 
+
50  uint8_t issueCommand(char command);
+
51 
+
53  bool sortSize();
+
54 
+
56  bool selectObjectMode();
+
57 
+
59  bool writeImageRegisters();
+
60 
+
62  bool disableTracking();
+
63 
+
65  bool enableTracking();
+
66 
+
68  bool getColorMap();
+
69 
+
71  bool illuminationOn();
+
72 
+
74  bool readImageRegisters();
+
75 
+
77  bool selectLineMode();
+
78 
+
80  bool pingCam();
+
81 
+
83  bool resetCam();
+
84 
+
86  bool sendColorMap();
+
87 
+
89  bool illuminationOff();
+
90 
+
92  bool sortColor();
+
93 
+
95  bool sortNone();
+
96 
+
98  bool camFirmware();
+
99 
+
101  int getNumberObjects();
+
102 
+
103 
+
122  void getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom);
+
123 
+
124 };
+
125 
+
126 #endif
+
EVs_NXTCam(uint8_t i2c_address=0x02)
Definition: EVs_NXTCam.cpp:32
+
bool pingCam()
Definition: EVs_NXTCam.cpp:87
+
bool sortSize()
Definition: EVs_NXTCam.cpp:42
+
bool sendColorMap()
Definition: EVs_NXTCam.cpp:97
+
Definition: EVs_PiLight.h:42
+
bool illuminationOff()
Definition: EVs_NXTCam.cpp:102
+
uint8_t issueCommand(char command)
Definition: EVs_NXTCam.cpp:37
+
bool resetCam()
Definition: EVs_NXTCam.cpp:92
+
bool writeImageRegisters()
Definition: EVs_NXTCam.cpp:52
+
bool readImageRegisters()
Definition: EVs_NXTCam.cpp:77
+
bool disableTracking()
Definition: EVs_NXTCam.cpp:57
+
bool illuminationOn()
Definition: EVs_NXTCam.cpp:72
+
bool selectLineMode()
Definition: EVs_NXTCam.cpp:82
+
This class interfaces with NXTCam attached to EVShield.
Definition: EVs_NXTCam.h:41
+
bool enableTracking()
Definition: EVs_NXTCam.cpp:62
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
bool getColorMap()
Definition: EVs_NXTCam.cpp:67
+
int getNumberObjects()
Definition: EVs_NXTCam.cpp:122
+
bool sortNone()
Definition: EVs_NXTCam.cpp:117
+
bool sortColor()
Definition: EVs_NXTCam.cpp:107
+
bool selectObjectMode()
Definition: EVs_NXTCam.cpp:47
+
void getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom)
Definition: EVs_NXTCam.cpp:127
+
bool camFirmware()
Definition: EVs_NXTCam.cpp:112
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_color_8h_source.html b/html/_e_vs___n_x_t_color_8h_source.html new file mode 100644 index 0000000..c5a66c3 --- /dev/null +++ b/html/_e_vs___n_x_t_color_8h_source.html @@ -0,0 +1,187 @@ + + + + + + +EVShield: EVs_NXTColor.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTColor.h
+
+
+
1 /*
+
2  * EVShield interface library
+
3  * Copyright (C) 2015 mindsensors.com
+
4  *
+
5  * This file is part of EVShield interface library.
+
6  This library is free software; you can redistribute it and/or
+
7  modify it under the terms of the GNU Lesser General Public
+
8  License as published by the Free Software Foundation; either
+
9  version 2.1 of the License, or (at your option) any later version.
+
10 
+
11  This library is distributed in the hope that it will be useful,
+
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  Lesser General Public License for more details.
+
15 
+
16  You should have received a copy of the GNU Lesser General Public
+
17  License along with this library; if not, write to the Free Software
+
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
19 */
+
20 
+
21 #ifndef EVs_NXTColor_H
+
22 #define EVs_NXTColor_H
+
23 
+
24 #include "SHDefines.h"
+
25 #include "EVShield.h"
+
26 
+ +
31 {
+
32  public:
+ +
35 
+ +
38 
+
41  int m_offset;
+
42 
+
44  EVs_NXTColor();
+
45 
+
47  EVs_NXTColor(EVShield * shield, SH_BankPort bp);
+
48 
+
50  bool setType(uint8_t type);
+
51 
+
53  //int readRaw();
+
54 
+
56  bool init(EVShield * shield, SH_BankPort bp);
+
57 
+
58  uint8_t readValue();
+
59 
+
60  uint8_t readColor();
+
61 
+
62 };
+
63 
+
64 
+
65 #endif
+
66 
+
bool setType(uint8_t type)
Definition: EVs_NXTColor.cpp:61
+
int m_offset
Definition: EVs_NXTColor.h:41
+
EVs_NXTColor()
Definition: EVs_NXTColor.cpp:21
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_NXTColor.cpp:43
+
SH_BankPort m_bp
Definition: EVs_NXTColor.h:37
+ +
EVShield * mp_shield
Definition: EVs_NXTColor.h:34
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
EVShield Analog Sensor class.
Definition: EVs_NXTColor.h:30
+
SH_BankPort
Definition: SHDefines.h:49
+ +
+
+ + + + diff --git a/html/_e_vs___n_x_t_current_meter_8h_source.html b/html/_e_vs___n_x_t_current_meter_8h_source.html new file mode 100644 index 0000000..176778a --- /dev/null +++ b/html/_e_vs___n_x_t_current_meter_8h_source.html @@ -0,0 +1,179 @@ + + + + + + +EVShield: EVs_NXTCurrentMeter.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTCurrentMeter.h
+
+
+
1 //EVs_NXTCurrentMeter.h
+
2 //
+
3 // This is a class for reading from NXTCurrentMeter, made by Mindsensors.
+
4 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=163
+
5 
+
6 // Initial version: 2013-01-24 by Michael Giles
+
7 // Modified for EVShield: 2015-2-16 by Michael Giles
+
8 // Large parts of the code is ported from the NXC library for the device,
+
9 // written by Deepak Patil.
+
10 /*
+
11  This library is free software; you can redistribute it and/or
+
12  modify it under the terms of the GNU Lesser General Public
+
13  License as published by the Free Software Foundation; either
+
14  version 2.1 of the License, or (at your option) any later version.
+
15 
+
16  This library is distributed in the hope that it will be useful,
+
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
19  Lesser General Public License for more details.
+
20 
+
21  You should have received a copy of the GNU Lesser General Public
+
22  License along with this library; if not, write to the Free Software
+
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
24 */
+
25 
+
26 #ifndef EVs_NXTCurrentMeter_H
+
27 #define EVs_NXTCurrentMeter_H
+
28 
+
29 #define IM_Command 0x41
+
30 
+
31 #define ABSOLUTE_I 0X43
+
32 #define RELATIVE_I 0x45
+
33 
+
34 #define REFERENCE_I 0X47
+
35 
+
36 #include "EVShieldI2C.h"
+ +
40 {
+
41 public:
+
43  EVs_CurrentMeter(uint8_t i2c_address = 0x28);
+
45  uint8_t issueCommand(char command);
+
48  int getACurrent();
+
51  int getRCurrent();
+
54  int getReference();
+
56  int setReferenceI();
+
57 
+
58 };
+
59 
+
60 #endif
+
EVs_CurrentMeter(uint8_t i2c_address=0x28)
Definition: EVs_NXTCurrentMeter.cpp:28
+
int getReference()
Definition: EVs_NXTCurrentMeter.cpp:49
+
int getACurrent()
Definition: EVs_NXTCurrentMeter.cpp:39
+
This class interfaces with sensor attached to EVShield.
Definition: EVs_NXTCurrentMeter.h:39
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
uint8_t issueCommand(char command)
Definition: EVs_NXTCurrentMeter.cpp:34
+
int getRCurrent()
Definition: EVs_NXTCurrentMeter.cpp:44
+
int setReferenceI()
Definition: EVs_NXTCurrentMeter.cpp:54
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_light_8h_source.html b/html/_e_vs___n_x_t_light_8h_source.html new file mode 100644 index 0000000..ce15529 --- /dev/null +++ b/html/_e_vs___n_x_t_light_8h_source.html @@ -0,0 +1,167 @@ + + + + + + +EVShield: EVs_NXTLight.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTLight.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 
+
23 #ifndef EVs_NXTLIGHT_H
+
24 #define EVs_NXTLIGHT_H
+
25 
+
26 #include "EVShieldAGS.h"
+
27 
+
33 class EVs_NXTLight : public EVShieldAGS
+
34 {
+
35 public:
+
37  bool init(EVShield * shield, SH_BankPort bp);
+
38 
+
40  bool setReflected();
+
41 
+
43  bool setAmbient();
+
44 };
+
45 
+
46 #endif
+
bool setReflected()
Definition: EVs_NXTLight.cpp:29
+
EVShield Analog Sensor class.
Definition: EVShieldAGS.h:32
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_NXTLight.cpp:24
+
bool setAmbient()
Definition: EVs_NXTLight.cpp:35
+
This class interfaces with LEGO Light sensor attached to EVShield.
Definition: EVs_NXTLight.h:33
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
SH_BankPort
Definition: SHDefines.h:49
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_m_m_x_8h_source.html b/html/_e_vs___n_x_t_m_m_x_8h_source.html new file mode 100644 index 0000000..db7003e --- /dev/null +++ b/html/_e_vs___n_x_t_m_m_x_8h_source.html @@ -0,0 +1,340 @@ + + + + + + +EVShield: EVs_NXTMMX.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTMMX.h
+
+
+
1 
+
2 // EVs_NXTMMX.h
+
3 //
+
4 // This is a class for controlling the Lego Motor Multiplexer, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=134 .
+
6 
+
7 // Initial version: 2010-06-07 by Clinton Blackmore
+
8 // Large ports of the code is ported from the NXC library for the device,
+
9 // written by Deepak Patil.
+
10 
+
11 /*
+
12  This library is free software; you can redistribute it and/or
+
13  modify it under the terms of the GNU Lesser General Public
+
14  License as published by the Free Software Foundation; either
+
15  version 2.1 of the License, or (at your option) any later version.
+
16 
+
17  This library is distributed in the hope that it will be useful,
+
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
20  Lesser General Public License for more details.
+
21 
+
22  You should have received a copy of the GNU Lesser General Public
+
23  License along with this library; if not, write to the Free Software
+
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
25 */
+
26 
+
27 #ifndef EVs_NXTMMX_H
+
28 #define EVs_NXTMMX_H
+
29 
+
30 // THE FOLLOWING CONSTANTS ARE ALL FROM THE NXC SOURCE CODE
+
31 
+
32 #define MMX_CONTROL_SPEED 0x01
+
33 #define MMX_CONTROL_RAMP 0x02
+
34 #define MMX_CONTROL_RELATIVE 0x04
+
35 #define MMX_CONTROL_TACHO 0x08
+
36 #define MMX_CONTROL_BRK 0x10
+
37 #define MMX_CONTROL_ON 0x20
+
38 #define MMX_CONTROL_TIME 0x40
+
39 #define MMX_CONTROL_GO 0x80
+
40 
+
41 #define MMX_COMMAND 0x41
+
42 #define MMX_VOLTAGE 0x41
+
43 
+
44 #define MMX_SETPT_M1 0x42
+
45 #define MMX_SPEED_M1 0x46
+
46 #define MMX_TIME_M1 0x47
+
47 #define MMX_CMD_B_M1 0x48
+
48 #define MMX_CMD_A_M1 0x49
+
49 
+
50 #define MMX_SETPT_M2 0x4A
+
51 #define MMX_SPEED_M2 0x4E
+
52 #define MMX_TIME_M2 0x4F
+
53 #define MMX_CMD_B_M2 0x50
+
54 #define MMX_CMD_A_M2 0x51
+
55 
+
56 /*
+
57  * Read registers.
+
58  */
+
59 #define MMX_POSITION_M1 0x62
+
60 #define MMX_POSITION_M2 0x66
+
61 #define MMX_STATUS_M1 0x72
+
62 #define MMX_STATUS_M2 0x73
+
63 #define MMX_TASKS_M1 0x76
+
64 #define MMX_TASKS_M2 0x77
+
65 
+
66 #define MMX_ENCODER_PID 0x7A
+
67 #define MMX_SPEED_PID 0x80
+
68 #define MMX_PASS_COUNT 0x86
+
69 #define MMX_TOLERANCE 0x87
+
70 
+
71 /* constants to be used by user programs */
+
72 /*
+
73  * Motor selection related constants
+
74  */
+
75 #define MMX_Motor_1 0x01
+
76 #define MMX_Motor_2 0x02
+
77 #define MMX_Motor_Both 0x03
+
78 
+
79 /*
+
80  * Next action related constants
+
81  */
+
82 // stop and let the motor coast.
+
83 #define MMX_Next_Action_Float 0x00
+
84 // apply brakes, and resist change to tachometer
+
85 #define MMX_Next_Action_Brake 0x01
+
86 // apply brakes, and restore externally forced change to tachometer
+
87 #define MMX_Next_Action_BrakeHold 0x02
+
88 
+
89 /*
+
90  * Direction related constants
+
91  */
+
92 #define MMX_Direction_Forward 0x01
+
93 #define MMX_Direction_Reverse 0x00
+
94 
+
95 /*
+
96  * Tachometer related constants
+
97  */
+
98 #define MMX_Move_Relative 0x01
+
99 #define MMX_Move_Absolute 0x00
+
100 
+
101 #define MMX_Completion_Wait_For 0x01
+
102 #define MMX_Completion_Dont_Wait 0x00
+
103 
+
104 /*
+
105  * Speed constants, these are just convenience constants,
+
106  * You can use any value between 0 and 100.
+
107  */
+
108 #define MMX_Speed_Full 90
+
109 #define MMX_Speed_Medium 60
+
110 #define MMX_Speed_Slow 25
+
111 
+
112 
+
113 #include "EVShieldI2C.h"
+
114 
+
118 class EVs_NXTMMX : public EVShieldI2C
+
119 {
+
120 public:
+
123  EVs_NXTMMX(uint8_t i2c_address = 0x06);
+
124 
+
126  uint8_t getBatteryVoltage();
+
127 
+
129  uint8_t issueCommand(char command);
+
130 
+
132  bool setEncoderTarget(uint8_t which_motor, long target);
+
133 
+
135  long getEncoderTarget(uint8_t which_motor);
+
136 
+
138  bool setSpeed(uint8_t which_motor, int speed);
+
139 
+
141  int8_t getSpeed(uint8_t which_motor);
+
142 
+
144  bool getTimeToRun(uint8_t which_motor, int seconds);
+
145 
+
147  uint8_t getTimeToRun(uint8_t which_motor);
+
148 
+
149  bool setCommandRegB(uint8_t which_motor, uint8_t value);
+
150  uint8_t getCommandRegB(uint8_t which_motor);
+
151  bool setCommandRegA(uint8_t which_motor, uint8_t value);
+
152  uint8_t getCommandRegA(uint8_t which_motor);
+
153 
+
155  int32_t getEncoderPosition(uint8_t which_motor);
+
156 
+
158  uint8_t getMotorStatusByte(uint8_t which_motor);
+
159 
+
161  uint8_t getMotorTasksRunningByte(uint8_t which_motor);
+
162 
+
164  bool setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd);
+
165 
+
167  bool setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd);
+
168 
+
170  bool setPassCount(uint8_t pass_count);
+
171 
+
173  bool setTolerance(uint8_t tolerance);
+
174 
+
176  bool reset();
+
177 
+
179  bool startMotorsInSync();
+
180 
+
182  bool resetEncoder(uint8_t which_motor);
+
183 
+
185  bool setSpeedTimeAndControl(uint8_t which_motors, int speed, uint8_t duration, uint8_t control);
+
186 
+
188  bool setEncoderSpeedTimeAndControl(uint8_t which_motors, long encoder, int speed, uint8_t duration, uint8_t control);
+
189 
+
191  bool isTimeDone(uint8_t which_motors);
+
192 
+
194  void waitUntilTimeDone(uint8_t which_motors);
+
195 
+
197  bool isTachoDone(uint8_t which_motors);
+
198 
+
200  void waitUntilTachoDone(uint8_t which_motors);
+
201 
+
203  void runUnlimited(uint8_t which_motors, uint8_t direction, int speed);
+
204 
+
206  void runSeconds(uint8_t which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action);
+
207 
+
209  void runTachometer(uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action);
+
210 
+
212  void runDegrees(uint8_t which_motors, uint8_t direction,int speed, long degrees, uint8_t wait_for_completion, uint8_t next_action);
+
213 
+
215  void runRotations( uint8_t which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action);
+
216 
+
218  bool stop(uint8_t which_motors, uint8_t next_action);
+
219 };
+
220 
+
221 #endif
+
void stop(void)
Definition: SoftI2cMaster.cpp:119
+
void runTachometer(uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action)
Definition: EVs_NXTMMX.cpp:338
+
bool startMotorsInSync()
Definition: EVs_NXTMMX.cpp:171
+
uint8_t getMotorTasksRunningByte(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:123
+
bool setSpeed(uint8_t which_motor, int speed)
Definition: EVs_NXTMMX.cpp:60
+
void waitUntilTimeDone(uint8_t which_motors)
Definition: EVs_NXTMMX.cpp:263
+
int8_t getSpeed(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:65
+
uint8_t getBatteryVoltage()
Definition: EVs_NXTMMX.cpp:35
+
This class interfaces with NXTMMX attached to EVShield.
Definition: EVs_NXTMMX.h:118
+
void runSeconds(uint8_t which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action)
Definition: EVs_NXTMMX.cpp:318
+
bool setSpeedTimeAndControl(uint8_t which_motors, int speed, uint8_t duration, uint8_t control)
Definition: EVs_NXTMMX.cpp:186
+
void runUnlimited(uint8_t which_motors, uint8_t direction, int speed)
Definition: EVs_NXTMMX.cpp:307
+
bool reset()
Definition: EVs_NXTMMX.cpp:165
+
uint8_t getMotorStatusByte(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:116
+
EVs_NXTMMX(uint8_t i2c_address=0x06)
Definition: EVs_NXTMMX.cpp:28
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
void waitUntilTachoDone(uint8_t which_motors)
Definition: EVs_NXTMMX.cpp:281
+
bool setTolerance(uint8_t tolerance)
Definition: EVs_NXTMMX.cpp:156
+
bool setPassCount(uint8_t pass_count)
Definition: EVs_NXTMMX.cpp:149
+
uint8_t issueCommand(char command)
Definition: EVs_NXTMMX.cpp:40
+
bool setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
Definition: EVs_NXTMMX.cpp:131
+
bool setEncoderSpeedTimeAndControl(uint8_t which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
Definition: EVs_NXTMMX.cpp:227
+
void runDegrees(uint8_t which_motors, uint8_t direction, int speed, long degrees, uint8_t wait_for_completion, uint8_t next_action)
Definition: EVs_NXTMMX.cpp:377
+
bool setEncoderTarget(uint8_t which_motor, long target)
Definition: EVs_NXTMMX.cpp:47
+
bool getTimeToRun(uint8_t which_motor, int seconds)
Definition: EVs_NXTMMX.cpp:72
+
bool isTimeDone(uint8_t which_motors)
Definition: EVs_NXTMMX.cpp:252
+
void runRotations(uint8_t which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action)
Definition: EVs_NXTMMX.cpp:390
+
bool isTachoDone(uint8_t which_motors)
Definition: EVs_NXTMMX.cpp:270
+
int32_t getEncoderPosition(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:109
+
bool resetEncoder(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:177
+
long getEncoderTarget(uint8_t which_motor)
Definition: EVs_NXTMMX.cpp:52
+
bool setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)
Definition: EVs_NXTMMX.cpp:140
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_servo_8h_source.html b/html/_e_vs___n_x_t_servo_8h_source.html new file mode 100644 index 0000000..d9cdd7b --- /dev/null +++ b/html/_e_vs___n_x_t_servo_8h_source.html @@ -0,0 +1,234 @@ + + + + + + +EVShield: EVs_NXTServo.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTServo.h
+
+
+
1 
+
2 // EVs_NXTServo.h
+
3 //
+
4 // This is a class for controlling the NXT Servo Controller, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=93 .
+
6 
+
7 // Initial version: 2010-06-17 by Andrew Sylvester.
+
8 // Modified for EVShield: 2015-02-16 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 #ifndef EVs_NXTServo_H
+
29 #define EVs_NXTServo_H
+
30 
+
31 #define Servo_Command 0x41
+
32 #define Servo_Voltage 0x41
+
33 
+
34 #define Servo_1 1
+
35 #define Servo_2 2
+
36 #define Servo_3 3
+
37 #define Servo_4 4
+
38 #define Servo_5 5
+
39 #define Servo_6 6
+
40 #define Servo_7 7
+
41 #define Servo_8 8
+
42 
+
43 #define Servo_Position_Default 1500
+
44 #define Servo_Speed_Full 0
+
45 
+
46 #define Servo_Position_1 0x5A
+
47 #define Servo_Position_2 0x5B
+
48 #define Servo_Position_3 0x5C
+
49 #define Servo_Position_4 0x5D
+
50 #define Servo_Position_5 0x5E
+
51 #define Servo_Position_6 0x5F
+
52 #define Servo_Position_7 0x60
+
53 #define Servo_Position_8 0x61
+
54 
+
55 #define Servo_Speed_1 0x52
+
56 #define Servo_Speed_2 0x53
+
57 #define Servo_Speed_3 0x54
+
58 #define Servo_Speed_4 0x55
+
59 #define Servo_Speed_5 0x56
+
60 #define Servo_Speed_6 0x57
+
61 #define Servo_Speed_7 0x58
+
62 #define Servo_Speed_8 0x59
+
63 
+
64 #include "EVShieldI2C.h"
+
65 
+
69 class EVs_NXTServo : public EVShieldI2C
+
70 {
+
71 public:
+
73  EVs_NXTServo(uint8_t i2c_address = 0xb0);
+
74 
+
76  uint8_t issueCommand(char command);
+
77 
+
79  uint8_t getBatteryVoltage();
+
80 
+
82  bool storeInitial();
+
83 
+
85  bool reset();
+
86 
+
88  bool haltMacro();
+
89 
+
91  bool resumeMacro();
+
92 
+
94  bool gotoEEPROM();
+
95 
+
97  bool editMacro();
+
98 
+
100  bool pauseMacro();
+
101 
+
103  bool setSpeed(uint8_t number, uint8_t speed);
+
104 
+
106  bool setPosition(uint8_t number, uint8_t position);
+
107 
+
109  void runServo(uint8_t number, uint8_t position, uint8_t speed);
+
110 
+
111 };
+
112 
+
113 #endif
+
uint8_t issueCommand(char command)
Definition: EVs_NXTServo.cpp:43
+
uint8_t getBatteryVoltage()
Definition: EVs_NXTServo.cpp:38
+
bool gotoEEPROM()
Definition: EVs_NXTServo.cpp:66
+
bool setSpeed(uint8_t number, uint8_t speed)
Definition: EVs_NXTServo.cpp:80
+
bool editMacro()
Definition: EVs_NXTServo.cpp:71
+
This class interfaces with NXTServo attached to EVShield.
Definition: EVs_NXTServo.h:69
+
bool storeInitial()
Definition: EVs_NXTServo.cpp:48
+
bool resumeMacro()
Definition: EVs_NXTServo.cpp:61
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
EVs_NXTServo(uint8_t i2c_address=0xb0)
Definition: EVs_NXTServo.cpp:33
+
bool setPosition(uint8_t number, uint8_t position)
Definition: EVs_NXTServo.cpp:85
+
bool haltMacro()
Definition: EVs_NXTServo.cpp:56
+
void runServo(uint8_t number, uint8_t position, uint8_t speed)
Definition: EVs_NXTServo.cpp:90
+
bool reset()
Definition: EVs_NXTServo.cpp:52
+
bool pauseMacro()
Definition: EVs_NXTServo.cpp:76
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_touch_8h_source.html b/html/_e_vs___n_x_t_touch_8h_source.html new file mode 100644 index 0000000..02993eb --- /dev/null +++ b/html/_e_vs___n_x_t_touch_8h_source.html @@ -0,0 +1,162 @@ + + + + + + +EVShield: EVs_NXTTouch.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTTouch.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2015 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 #ifndef EVs_NXTTOUCH_H
+
23 #define EVs_NXTTOUCH_H
+
24 
+
25 #include "EVShieldAGS.h"
+
26 
+
30 class EVs_NXTTouch : public EVShieldAGS
+
31 {
+
32 public:
+
34  bool init(EVShield * shield, SH_BankPort bp);
+
35  bool isPressed();
+
36 };
+
37 
+
38 #endif
+
39 
+
EVShield Analog Sensor class.
Definition: EVShieldAGS.h:32
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
This class interfaces with LEGO NXT Touch sensor attached to EVShield.
Definition: EVs_NXTTouch.h:30
+
SH_BankPort
Definition: SHDefines.h:49
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_NXTTouch.cpp:24
+
+
+ + + + diff --git a/html/_e_vs___n_x_t_volt_meter_8h_source.html b/html/_e_vs___n_x_t_volt_meter_8h_source.html new file mode 100644 index 0000000..e9762f8 --- /dev/null +++ b/html/_e_vs___n_x_t_volt_meter_8h_source.html @@ -0,0 +1,179 @@ + + + + + + +EVShield: EVs_NXTVoltMeter.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTVoltMeter.h
+
+
+
1 //EVs_NXTVoltMeter.h
+
2 //
+
3 // This is a class for reading from NXTVoltMeter, made by Mindsensors.
+
4 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=162
+
5 
+
6 // Initial version: 2013-01-24 by Michael Giles
+
7 // Modified for EVShield: 2015-2-16 by Michael Giles
+
8 // Large parts of the code is ported from the NXC library for the device,
+
9 // written by Deepak Patil.
+
10 /*
+
11  This library is free software; you can redistribute it and/or
+
12  modify it under the terms of the GNU Lesser General Public
+
13  License as published by the Free Software Foundation; either
+
14  version 2.1 of the License, or (at your option) any later version.
+
15 
+
16  This library is distributed in the hope that it will be useful,
+
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
19  Lesser General Public License for more details.
+
20 
+
21  You should have received a copy of the GNU Lesser General Public
+
22  License along with this library; if not, write to the Free Software
+
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
24 */
+
25 
+
26 #ifndef EVs_NXTVoltMeter_H
+
27 #define EVs_NXTVoltMeter_H
+
28 
+
29 #define VM_Command 0x41
+
30 
+
31 #define ABSOLUTE_V 0X43
+
32 #define RELATIVE_V 0x45
+
33 
+
34 #define REFERENCE_V 0X47
+
35 
+
36 #include "EVShieldI2C.h"
+
39 class EVs_VoltMeter : public EVShieldI2C
+
40 {
+
41 public:
+
43  EVs_VoltMeter(uint8_t i2c_address = 0x26);
+
45  uint8_t issueCommand(char command);
+
48  int getAVoltage();
+
51  int getRVoltage();
+
54  int getReference();
+
56  int setReferenceV();
+
57 
+
58 };
+
59 
+
60 #endif
+
int getRVoltage()
Definition: EVs_NXTVoltMeter.cpp:44
+
This class interfaces with sensor attached to EVShield.
Definition: EVs_NXTVoltMeter.h:39
+
uint8_t issueCommand(char command)
Definition: EVs_NXTVoltMeter.cpp:34
+
int getReference()
Definition: EVs_NXTVoltMeter.cpp:49
+
EVs_VoltMeter(uint8_t i2c_address=0x26)
Definition: EVs_NXTVoltMeter.cpp:28
+
int setReferenceV()
Definition: EVs_NXTVoltMeter.cpp:54
+
int getAVoltage()
Definition: EVs_NXTVoltMeter.cpp:39
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
+
+ + + + diff --git a/html/_e_vs___numeric_pad_8h_source.html b/html/_e_vs___numeric_pad_8h_source.html new file mode 100644 index 0000000..8f5d6a0 --- /dev/null +++ b/html/_e_vs___numeric_pad_8h_source.html @@ -0,0 +1,174 @@ + + + + + + +EVShield: EVs_NumericPad.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NumericPad.h
+
+
+
1 // EVs_NumericPad.h
+
2 //
+
3 // This is a class for reading from NumericPad, made by Mindsensors.
+
4 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=138
+
5 
+
6 // Initial version: 2011-07-19 by Michael Giles
+
7 // Modified for EVShield: 2015-02-16 Michael Giles
+
8 // Large parts of the code is ported from the NXC library for the device,
+
9 // written by Deepak Patil.
+
10 
+
11 /*
+
12  This library is free software; you can redistribute it and/or
+
13  modify it under the terms of the GNU Lesser General Public
+
14  License as published by the Free Software Foundation; either
+
15  version 2.1 of the License, or (at your option) any later version.
+
16 
+
17  This library is distributed in the hope that it will be useful,
+
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
20  Lesser General Public License for more details.
+
21 
+
22  You should have received a copy of the GNU Lesser General Public
+
23  License along with this library; if not, write to the Free Software
+
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
25 */
+
26 
+
27 
+
28 #ifndef EVs_NumericPad_H
+
29 #define EVs_NumericPad_H
+
30 
+
31 #include "EVShieldI2C.h"
+
32 
+ +
37 {
+
38 public:
+
40  EVs_NumericPad(uint8_t i2c_address = 0xB4);
+
41 
+
45  void InitializeKeypad();
+
46 
+
53  bool GetKeyPress(int waitPeriod/* seconds */, byte &keyHolder);
+
54 
+
60  int GetKeysPressed();
+
61 
+
62 };
+
63 
+
64 #endif /* EVs_NumericPad_H_ */
+
void InitializeKeypad()
Definition: EVs_NumericPad.cpp:54
+
EVs_NumericPad(uint8_t i2c_address=0xB4)
Definition: EVs_NumericPad.cpp:49
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
bool GetKeyPress(int waitPeriod, byte &keyHolder)
Definition: EVs_NumericPad.cpp:76
+
int GetKeysPressed()
Definition: EVs_NumericPad.cpp:116
+
This class interfaces with NumericPad attached to EVShield.
Definition: EVs_NumericPad.h:36
+
+
+ + + + diff --git a/html/_e_vs___p_f_mate_8h_source.html b/html/_e_vs___p_f_mate_8h_source.html new file mode 100644 index 0000000..2423548 --- /dev/null +++ b/html/_e_vs___p_f_mate_8h_source.html @@ -0,0 +1,218 @@ + + + + + + +EVShield: EVs_PFMate.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PFMate.h
+
+
+
1 
+
2 // EVs_PFMate.h
+
3 //
+
4 // This is a class for controlling the PF Motor Controller, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=107 .
+
6 
+
7 // Initial version: 2010-06-17 by Andrew Sylvester
+
8 // Modified for EVShield: 2015-02-17 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_PFMate_H
+
30 #define EVs_PFMate_H
+
31 
+
32 #define PF_Commmand 0x41
+
33 
+
34 #define PF_Channel 0x42
+
35 #define PF_Channel_1 1
+
36 #define PF_Channel_2 2
+
37 #define PF_Channel_3 3
+
38 #define PF_Channel_4 4
+
39 
+
40 #define PF_Control 0x43
+
41 #define PF_Contol_Both 0
+
42 #define PF_Contol_A 1
+
43 #define PF_Contol_B 2
+
44 
+
45 #define PF_Speed_A 0x45
+
46 #define PF_Speed_B 0x47
+
47 #define PF_Speed_Slow 1
+
48 #define PF_Speed_Medium 4
+
49 #define PF_Speed_Full 7
+
50 
+
51 #define PF_Operation_A 0x44
+
52 #define PF_Operation_B 0x46
+
53 #define PF_Operation_Float 0
+
54 #define PF_Operation_Forward 1
+
55 #define PF_Operation_Reverse 2
+
56 #define PF_Operation_Brake 3
+
57 
+
58 #include "EVShieldI2C.h"
+
59 
+
63 class EVs_PFMate : public EVShieldI2C
+
64 {
+
65 public:
+
67  EVs_PFMate(uint8_t i2c_address = 0x48);
+
68 
+
70  uint8_t issueCommand(char command);
+
71 
+
73  bool sendSignal();
+
74 
+
76  void controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed);
+
77 
+
79  bool setChannel(uint8_t channel);
+
80 
+
82  bool setControl(uint8_t contol);
+
83 
+
85  bool setOperationA(uint8_t operation);
+
86 
+
88  bool setOperationB(uint8_t operation);
+
89 
+
91  bool setSpeedA(uint8_t speed);
+
92 
+
94  bool setSpeedB(uint8_t speed);
+
95 };
+
96 
+
97 #endif
+
bool setOperationB(uint8_t operation)
Definition: EVs_PFMate.cpp:62
+
void controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed)
Definition: EVs_PFMate.cpp:77
+
uint8_t issueCommand(char command)
Definition: EVs_PFMate.cpp:37
+
bool setSpeedB(uint8_t speed)
Definition: EVs_PFMate.cpp:72
+
bool setSpeedA(uint8_t speed)
Definition: EVs_PFMate.cpp:67
+
EVs_PFMate(uint8_t i2c_address=0x48)
Definition: EVs_PFMate.cpp:33
+
bool setChannel(uint8_t channel)
Definition: EVs_PFMate.cpp:47
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
bool sendSignal()
Definition: EVs_PFMate.cpp:42
+
bool setOperationA(uint8_t operation)
Definition: EVs_PFMate.cpp:57
+
This class interfaces with PFMate attached to EVShield.
Definition: EVs_PFMate.h:63
+
bool setControl(uint8_t contol)
Definition: EVs_PFMate.cpp:52
+
+
+ + + + diff --git a/html/_e_vs___p_s_p_nx_8h_source.html b/html/_e_vs___p_s_p_nx_8h_source.html new file mode 100644 index 0000000..9b1b475 --- /dev/null +++ b/html/_e_vs___p_s_p_nx_8h_source.html @@ -0,0 +1,222 @@ + + + + + + +EVShield: EVs_PSPNx.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PSPNx.h
+
+
+
1 
+
2 // EVs_PSPNx.h
+
3 //
+
4 // This is a class for reading from PSP-Nx, made by Mindsensors.
+
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=61
+
6 
+
7 // Initial version: 2010-06-15 by Andrew Sylvester
+
8 // Modified for EVShield: 2015-02-17 by Michael Giles
+
9 // Large parts of the code is ported from the NXC library for the device,
+
10 // written by Deepak Patil.
+
11 
+
12 /*
+
13  This library is free software; you can redistribute it and/or
+
14  modify it under the terms of the GNU Lesser General Public
+
15  License as published by the Free Software Foundation; either
+
16  version 2.1 of the License, or (at your option) any later version.
+
17 
+
18  This library is distributed in the hope that it will be useful,
+
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
21  Lesser General Public License for more details.
+
22 
+
23  You should have received a copy of the GNU Lesser General Public
+
24  License along with this library; if not, write to the Free Software
+
25  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
26 */
+
27 
+
28 
+
29 #ifndef EVs_PSPNx_H
+
30 #define EVs_PSPNx_H
+
31 
+
32 #define PSPNx_Command 0x41
+
33 #define PSPNx_ButtonSet1 0x42
+
34 #define PSPNx_ButtonSet2 0x43
+
35 #define PSPNx_XLeftJoystick 0x44
+
36 #define PSPNx_YLeftJoystick 0x45
+
37 #define PSPNx_XRightJoystick 0x46
+
38 #define PSPNx_YRightJoystick 0x47
+
39 
+
40 #define BS2_Button_L2 0
+
41 #define BS2_Button_R2 1
+
42 #define BS2_Button_L1 2
+
43 #define BS2_Button_R1 3
+
44 #define BS2_Button_Triangle 4
+
45 #define BS2_Button_Circle 5
+
46 #define BS2_Button_Cross 6
+
47 #define BS2_Button_Square 7
+
48 
+
49 #define BS1_Button_Select 0
+
50 #define BS1_Button_L3 1
+
51 #define BS1_Button_R3 2
+
52 #define BS1_Button_Start 3
+
53 #define BS1_Button_Up 4
+
54 #define BS1_Button_Right 5
+
55 #define BS1_Button_Down 6
+
56 #define BS1_Button_Left 7
+
57 
+
58 #include "EVShieldI2C.h"
+
59 
+
63 class EVs_PSPNx : public EVShieldI2C
+
64 {
+
65 public:
+
67  EVs_PSPNx(uint8_t i2c_address = 0x02);
+
68 
+
70  uint8_t issueCommand(char command);
+
71 
+
73  bool energize();
+
74 
+
76  bool deEnergize();
+
77 
+
79  bool setDigitalMode();
+
80 
+
82  bool setAnalogMode();
+
83 
+
87  int8_t getXLJoy();
+
88 
+
92  int8_t getYLJoy();
+
93 
+
97  int8_t getXRJoy();
+
98 
+
102  int8_t getYRJoy();
+
103 
+
105  void getButtons(int8_t *buttons1, int8_t *buttons2);
+
106 
+
107 };
+
108 
+
109 #endif
+
int8_t getXLJoy()
Definition: EVs_PSPNx.cpp:61
+
uint8_t issueCommand(char command)
Definition: EVs_PSPNx.cpp:36
+
void getButtons(int8_t *buttons1, int8_t *buttons2)
Definition: EVs_PSPNx.cpp:94
+
int8_t getYRJoy()
Definition: EVs_PSPNx.cpp:85
+
This class interfaces with PSP-Nx attached to EVShield.
Definition: EVs_PSPNx.h:63
+
bool deEnergize()
Definition: EVs_PSPNx.cpp:46
+
EVs_PSPNx(uint8_t i2c_address=0x02)
Definition: EVs_PSPNx.cpp:31
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
bool setDigitalMode()
Definition: EVs_PSPNx.cpp:51
+
int8_t getYLJoy()
Definition: EVs_PSPNx.cpp:69
+
bool energize()
Definition: EVs_PSPNx.cpp:41
+
int8_t getXRJoy()
Definition: EVs_PSPNx.cpp:77
+
bool setAnalogMode()
Definition: EVs_PSPNx.cpp:56
+
+
+ + + + diff --git a/html/_e_vs___pi_light_8h_source.html b/html/_e_vs___pi_light_8h_source.html new file mode 100644 index 0000000..676c187 --- /dev/null +++ b/html/_e_vs___pi_light_8h_source.html @@ -0,0 +1,188 @@ + + + + + + +EVShield: EVs_PiLight.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PiLight.h
+
+
+
1 
+
2 // PiLight.h
+
3 //
+
4 // This is a class for writing to PiLight, made by Openelectrons.
+
5 // See http://www.openelectrons.com/pages/19
+
6 
+
7 // Initial version: 2014-03-17 by Michael Giles
+
8 // Large parts of the code is ported from the Raspberry Pi library for the device,
+
9 // written by Nitin Patil.
+
10 
+
11 /*
+
12  This library is free software; you can redistribute it and/or
+
13  modify it under the terms of the GNU Lesser General Public
+
14  License as published by the Free Software Foundation; either
+
15  version 2.1 of the License, or (at your option) any later version.
+
16 
+
17  This library is distributed in the hope that it will be useful,
+
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
20  Lesser General Public License for more details.
+
21 
+
22  You should have received a copy of the GNU Lesser General Public
+
23  License along with this library; if not, write to the Free Software
+
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
25 */
+
26 
+
27 
+
28 #ifndef EVs_PILIGHT_H
+
29 #define EVs_PILIGHT_H
+
30 
+
31 #include "EVShieldI2C.h"
+
32 
+
33 // Color Registers.
+
34 #define PILIGHT_RED 0x42
+
35 #define PILIGHT_GREEN 0x43
+
36 #define PILIGHT_BLUE 0x44
+
37 
+
42 struct color
+
43 {
+
44  byte r;
+
45  byte g;
+
46  byte b;
+
47 };
+
48 
+
52 class EVs_PiLight : public EVShieldI2C
+
53 {
+
54 public:
+
56  EVs_PiLight(uint8_t i2c_address = 0x30);
+
57 
+
62  void readPiLight(color & currcolor);
+
63 
+
67  void setTimeout1(uint8_t timeoutValue);
+
68 
+
75  void createPiLight(uint8_t red, uint8_t green, uint8_t blue);
+
76 };
+
77 #endif
+
EVs_PiLight(uint8_t i2c_address=0x30)
Definition: EVs_PiLight.cpp:29
+
Definition: EVs_PiLight.h:42
+
byte g
Definition: EVs_PiLight.h:45
+
void readPiLight(color &currcolor)
Definition: EVs_PiLight.cpp:35
+
This class interfaces with PiLight sensor attached to EVShield.
Definition: EVs_PiLight.h:52
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
byte r
Definition: EVs_PiLight.h:44
+
void createPiLight(uint8_t red, uint8_t green, uint8_t blue)
Definition: EVs_PiLight.cpp:55
+
byte b
Definition: EVs_PiLight.h:46
+
void setTimeout1(uint8_t timeoutValue)
Definition: EVs_PiLight.cpp:45
+
+
+ + + + diff --git a/html/_e_vs___r_t_c_8h_source.html b/html/_e_vs___r_t_c_8h_source.html new file mode 100644 index 0000000..7cd5fe8 --- /dev/null +++ b/html/_e_vs___r_t_c_8h_source.html @@ -0,0 +1,197 @@ + + + + + + +EVShield: EVs_RTC.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_RTC.h
+
+
+
1 
+
2 // EVs_RTC.h
+
3 // This is a class for reading from Real-time Clock, made by Mindsensors.
+
4 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=101
+
5 
+
6 // Initial version: 2010-06-10 by Andrew Sylvester
+
7 // Modified for EVShield: 2015-02-16 by Michael Giles
+
8 // Large parts of the code is ported from the NXC library for the device,
+
9 // written by Deepak Patil.
+
10 
+
11 /*
+
12  This library is free software; you can redistribute it and/or
+
13  modify it under the terms of the GNU Lesser General Public
+
14  License as published by the Free Software Foundation; either
+
15  version 2.1 of the License, or (at your option) any later version.
+
16 
+
17  This library is distributed in the hope that it will be useful,
+
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
20  Lesser General Public License for more details.
+
21 
+
22  You should have received a copy of the GNU Lesser General Public
+
23  License along with this library; if not, write to the Free Software
+
24  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
25 */
+
26 
+
27 
+
28 #ifndef EVs_RTC_H
+
29 #define EVs_RTC_H
+
30 
+
31 #define RTC_Seconds 0x00
+
32 #define RTC_Minutes 0x01
+
33 #define RTC_Hours 0x02
+
34 #define RTC_Day_of_Week 0x03
+
35 #define RTC_Day_of_Month 0x04
+
36 #define RTC_Month 0x05
+
37 #define RTC_Year 0x06
+
38 
+
39 #include "EVShieldI2C.h"
+
40 
+
44 class EVs_RTC : public EVShieldI2C
+
45 {
+
46 public:
+
48  EVs_RTC(uint8_t i2c_address = 0xD0);
+
49 
+
51  uint8_t getSeconds();
+
52 
+
54  uint8_t getMinutes();
+
55 
+
57  uint8_t getHours();
+
58 
+
60  uint8_t getDayWeek();
+
61 
+
63  uint8_t getDayMonth();
+
64 
+
66  uint8_t getMonth();
+
67 
+
69  uint8_t getYear();
+
70 
+
71 private:
+
72  uint8_t BCDToInteger(uint8_t b);
+
73 
+
74 };
+
75 
+
76 #endif /* RTC_H_ */
+
EVs_RTC(uint8_t i2c_address=0xD0)
Definition: EVs_RTC.cpp:32
+
uint8_t getYear()
Definition: EVs_RTC.cpp:74
+
uint8_t getSeconds()
Definition: EVs_RTC.cpp:44
+
uint8_t getDayWeek()
Definition: EVs_RTC.cpp:59
+
uint8_t getHours()
Definition: EVs_RTC.cpp:54
+
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32
+
This class interfaces with RTC attached to EVShield.
Definition: EVs_RTC.h:44
+
uint8_t getDayMonth()
Definition: EVs_RTC.cpp:64
+
uint8_t getMonth()
Definition: EVs_RTC.cpp:69
+
uint8_t getMinutes()
Definition: EVs_RTC.cpp:49
+
+
+ + + + diff --git a/html/_e_vs___sumo_eyes_8h_source.html b/html/_e_vs___sumo_eyes_8h_source.html new file mode 100644 index 0000000..2e4a0b0 --- /dev/null +++ b/html/_e_vs___sumo_eyes_8h_source.html @@ -0,0 +1,189 @@ + + + + + + +EVShield: EVs_SumoEyes.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_SumoEyes.h
+
+
+
1 
+
2 /*
+
3  * EVShield interface library
+
4  * Copyright (C) 2011 mindsensors.com
+
5  *
+
6  * This file is part of EVShield interface library.
+
7  This library is free software; you can redistribute it and/or
+
8  modify it under the terms of the GNU Lesser General Public
+
9  License as published by the Free Software Foundation; either
+
10  version 2.1 of the License, or (at your option) any later version.
+
11 
+
12  This library is distributed in the hope that it will be useful,
+
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
15  Lesser General Public License for more details.
+
16 
+
17  You should have received a copy of the GNU Lesser General Public
+
18  License along with this library; if not, write to the Free Software
+
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
20 */
+
21 
+
22 
+
23 #ifndef EVs_SUMOEYES_H
+
24 #define EVs_SUMOEYES_H
+
25 
+
26 #include "EVShieldAGS.h"
+
27 
+
28 typedef enum {
+
29  SE_None = 0,
+
30  SE_Front,
+
31  SE_Left,
+
32  SE_Right
+
33 } SE_Zone;
+
34 
+
38 class EVs_SumoEyes : public EVShieldAGS
+
39 {
+
40 public:
+
42  bool init(EVShield * shield, SH_BankPort bp);
+
43 
+
45  bool setType(int8_t type);
+
46 
+
48  bool setLongRange();
+
49 
+
51  bool setShortRange();
+
52 
+
54  SE_Zone detectObstacleZone();
+
55 
+
57  char *OBZoneToString(SE_Zone ob);
+
58 
+
59 private:
+
60  bool isNear(int reference, int delta, int comet);
+
61 
+
62 };
+
63 
+
64 #endif
+
65 
+
66 
+
EVShield Analog Sensor class.
Definition: EVShieldAGS.h:32
+
This class interfaces with EVTSumoEyes sensor attached to EVShield.
Definition: EVs_SumoEyes.h:38
+
bool setLongRange()
Definition: EVs_SumoEyes.cpp:54
+
SE_Zone detectObstacleZone()
Definition: EVs_SumoEyes.cpp:68
+
bool setType(int8_t type)
Definition: EVs_SumoEyes.cpp:30
+
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_SumoEyes.cpp:24
+
This class defines methods to access EVShield features.
Definition: EVShield.h:675
+
char * OBZoneToString(SE_Zone ob)
Definition: EVs_SumoEyes.cpp:81
+
SH_BankPort
Definition: SHDefines.h:49
+
bool setShortRange()
Definition: EVs_SumoEyes.cpp:49
+
+
+ + + + diff --git a/html/_ms_timer2_8h_source.html b/html/_ms_timer2_8h_source.html new file mode 100644 index 0000000..cce3d2b --- /dev/null +++ b/html/_ms_timer2_8h_source.html @@ -0,0 +1,141 @@ + + + + + + +EVShield: MsTimer2.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
MsTimer2.h
+
+
+
1 #ifndef MsTimer2_h
+
2 #define MsTimer2_h
+
3 
+
4 #include <avr/interrupt.h>
+
5 
+
6 namespace MsTimer2 {
+
7  extern unsigned long msecs;
+
8  extern void (*func)();
+
9  extern volatile unsigned long count;
+
10  extern volatile char overflowing;
+
11  extern volatile unsigned int tcnt2;
+
12 
+
13  void set(unsigned long ms, void (*f)());
+
14  void start();
+
15  void stop();
+
16  void _overflow();
+
17 }
+
18 
+
19 #endif
+
+
+ + + + diff --git a/html/_s_h_defines_8h.html b/html/_s_h_defines_8h.html new file mode 100644 index 0000000..ece6fa8 --- /dev/null +++ b/html/_s_h_defines_8h.html @@ -0,0 +1,240 @@ + + + + + + +EVShield: SHDefines.h File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
SHDefines.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define SCL_BAS1   21
 
+#define SDA_BAS1   20
 
+#define SCL_BAS2   19
 
+#define SDA_BAS2   A13
 
+#define SCL_BBS1   17
 
+#define SDA_BBS1   A14
 
+#define SCL_BBS2   18
 
+#define SDA_BBS2   A15
 
+#define BTN_LEFT   16
 
+#define BTN_GO   15
 
+#define BTN_RIGHT   14
 
+#define LED_RED   16
 
+#define LED_GREEN   15
 
+#define LED_BLUE   14
 
+ + + + + + +

+Enumerations

enum  SH_BankPort { SH_BAS1 = 0x01, +SH_BAS2 = 0x02, +SH_BBS1 = 0x03, +SH_BBS2 = 0x04 + }
 
enum  SH_Protocols { SH_HardwareI2C = 0, +SH_SoftwareI2C + }
 Protocols supported by EVShield. More...
 
+

Detailed Description

+

SHDefines.h defines global definitions and constants used by EVShield library.

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum SH_BankPort
+
+

for the sensor bank ports

+ + + + + +
Enumerator
SH_BAS1  +

Bank A Sensor Port 1

+
SH_BAS2  +

Bank A Sensor Port 2

+
SH_BBS1  +

Bank B Sensor Port 1

+
SH_BBS2  +

Bank B Sensor Port 2

+
+ +
+
+ +
+
+ + + + +
enum SH_Protocols
+
+ +

Protocols supported by EVShield.

+

Protocol enums - to initialize your EVShield with appropriate protocol.

+ + + +
Enumerator
SH_HardwareI2C  +

It's best to use hardware i2c as it is faster, (but it does not work with Ultrasonic Sensor).

+
SH_SoftwareI2C  +

Software I2C is slower, and designed to work with Ultrasonic sensor.

+
+ +
+
+
+
+ + + + diff --git a/html/_s_h_defines_8h.js b/html/_s_h_defines_8h.js new file mode 100644 index 0000000..4d66269 --- /dev/null +++ b/html/_s_h_defines_8h.js @@ -0,0 +1,27 @@ +var _s_h_defines_8h = +[ + [ "BTN_GO", "_s_h_defines_8h.html#afe7569574e3d736dbfb837ef409c513a", null ], + [ "BTN_LEFT", "_s_h_defines_8h.html#a7881c76074b0ea36507f46b36840f54b", null ], + [ "BTN_RIGHT", "_s_h_defines_8h.html#aeb8b29caaae1a7515c8bd9473e6eefb1", null ], + [ "LED_BLUE", "_s_h_defines_8h.html#ae2e40566d27689f8581d7b0f12271d45", null ], + [ "LED_GREEN", "_s_h_defines_8h.html#aca338dbd19d7940923334629f6e5f3b7", null ], + [ "LED_RED", "_s_h_defines_8h.html#a31e20330f8ce94e0dd10b005a15c5898", null ], + [ "SCL_BAS1", "_s_h_defines_8h.html#aeb8a1089ff882089110dccd1ad088e69", null ], + [ "SCL_BAS2", "_s_h_defines_8h.html#a753104eb2f6c75edfb045b56c081d6fc", null ], + [ "SCL_BBS1", "_s_h_defines_8h.html#a776584d3cdeb51c142eea9e9e6a55340", null ], + [ "SCL_BBS2", "_s_h_defines_8h.html#a469fa43f94011d26e0cd3985f99d762d", null ], + [ "SDA_BAS1", "_s_h_defines_8h.html#ac8b1b66fb2a336988961a90ba215a690", null ], + [ "SDA_BAS2", "_s_h_defines_8h.html#a232b8c99b404634127b5b3d808ae1798", null ], + [ "SDA_BBS1", "_s_h_defines_8h.html#acf7e81a02ea5c79b5053cc71e30238eb", null ], + [ "SDA_BBS2", "_s_h_defines_8h.html#ae5d9ab06266968850ff74d4ef2d22f56", null ], + [ "SH_BankPort", "_s_h_defines_8h.html#a31de44930af0260d3d96576c39e5bc12", [ + [ "SH_BAS1", "_s_h_defines_8h.html#a31de44930af0260d3d96576c39e5bc12af49da03f953fc6c8da964dd535be91ba", null ], + [ "SH_BAS2", "_s_h_defines_8h.html#a31de44930af0260d3d96576c39e5bc12ab55deab5f7352c6c1b97834323de0a06", null ], + [ "SH_BBS1", "_s_h_defines_8h.html#a31de44930af0260d3d96576c39e5bc12aeb892f6256a2501d7d0c61a3f9e7e35f", null ], + [ "SH_BBS2", "_s_h_defines_8h.html#a31de44930af0260d3d96576c39e5bc12a52279ed0e67ff0fc8e0390de2f7c2c46", null ] + ] ], + [ "SH_Protocols", "_s_h_defines_8h.html#a981015d84d9e58975ebbb9cf83bbac75", [ + [ "SH_HardwareI2C", "_s_h_defines_8h.html#a981015d84d9e58975ebbb9cf83bbac75a8acfa7e97ceb22441cee34790b2820bd", null ], + [ "SH_SoftwareI2C", "_s_h_defines_8h.html#a981015d84d9e58975ebbb9cf83bbac75a6b3c8be1e881a6125fd9e192b91003d2", null ] + ] ] +]; \ No newline at end of file diff --git a/html/_s_h_defines_8h_source.html b/html/_s_h_defines_8h_source.html new file mode 100644 index 0000000..6403a1c --- /dev/null +++ b/html/_s_h_defines_8h_source.html @@ -0,0 +1,228 @@ + + + + + + +EVShield: SHDefines.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
SHDefines.h
+
+
+Go to the documentation of this file.
1 
+
5 /*
+
6  * EVShield interface library
+
7  * Copyright (C) 2015 mindsensors.com
+
8  *
+
9  * This file is part of EVShield interface library.
+
10  This library is free software; you can redistribute it and/or
+
11  modify it under the terms of the GNU Lesser General Public
+
12  License as published by the Free Software Foundation; either
+
13  version 2.1 of the License, or (at your option) any later version.
+
14 
+
15  This library is distributed in the hope that it will be useful,
+
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
+
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
18  Lesser General Public License for more details.
+
19 
+
20  You should have received a copy of the GNU Lesser General Public
+
21  License along with this library; if not, write to the Free Software
+
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
23 */
+
24 
+
25 #ifndef SHDEFINES_H
+
26 #define SHDEFINES_H
+
27 
+
28 #if defined(__AVR__)
+
29  #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)
+
30  #define MODEL_EVSHIELD_D
+
31  #else
+
32  #define MODEL_EVSHIELD_M
+
33  #endif
+
34 
+
35 #elif defined(__PIC32MX__)
+
36 
+
37  #if defined(_BOARD_UNO_)
+
38  #define MODEL_EVSHIELD_D
+
39  #elif defined(_BOARD_MEGA_)
+
40  #define MODEL_EVSHIELD_M
+
41  #endif
+
42 
+
43 #endif
+
44 
+
45 
+
49 typedef enum {
+
50  SH_BAS1 = 0x01,
+
51  SH_BAS2 = 0x02,
+
52  SH_BBS1 = 0x03,
+
53  SH_BBS2 = 0x04
+
54 } SH_BankPort;
+
55 
+
57 
+
60 typedef enum {
+ + +
63 } SH_Protocols;
+
64 
+
65 #if defined(MODEL_EVSHIELD_D)
+
66  // Arduino Duemilanove, Uno
+
67  #define SCL_BAS1 A5
+
68  #define SDA_BAS1 A4
+
69  #define SCL_BAS2 2
+
70  #define SDA_BAS2 A0
+
71  #define SCL_BBS1 4
+
72  #define SDA_BBS1 A1
+
73  #define SCL_BBS2 7
+
74  #define SDA_BBS2 A2
+
75 
+
76  // deepak
+
77  #define BTN_RIGHT 4
+
78  #define BTN_LEFT 1
+
79  // deepak end
+
80 
+
81  #define BTN_GO 2
+
82  #define LED_RED 8
+
83  #define LED_GREEN A3
+
84  #define LED_BLUE 12
+
85 
+
86 #else
+
87  // Arduino mega, 2560
+
88  #define SCL_BAS1 21
+
89  #define SDA_BAS1 20
+
90  #define SCL_BAS2 19
+
91  #define SDA_BAS2 A13
+
92  #define SCL_BBS1 17
+
93  #define SDA_BBS1 A14
+
94  #define SCL_BBS2 18
+
95  #define SDA_BBS2 A15
+
96 
+
97  #define BTN_LEFT 16
+
98  #define BTN_GO 15
+
99  #define BTN_RIGHT 14
+
100  #define LED_RED 16
+
101  #define LED_GREEN 15
+
102  #define LED_BLUE 14
+
103 
+
104 #endif
+
105 
+
106 #endif
+
107 
+
Definition: SHDefines.h:61
+
Definition: SHDefines.h:53
+
Definition: SHDefines.h:62
+
SH_Protocols
Protocols supported by EVShield.
Definition: SHDefines.h:60
+
Definition: SHDefines.h:51
+
SH_BankPort
Definition: SHDefines.h:49
+
Definition: SHDefines.h:52
+
Definition: SHDefines.h:50
+
+
+ + + + diff --git a/html/_soft_i2c_master_8h_source.html b/html/_soft_i2c_master_8h_source.html new file mode 100644 index 0000000..7ec5dbe --- /dev/null +++ b/html/_soft_i2c_master_8h_source.html @@ -0,0 +1,243 @@ + + + + + + +EVShield: SoftI2cMaster.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
SoftI2cMaster.h
+
+
+
1 /* Arduino SoftI2cMaster Library
+
2  * Copyright (C) 2009 by William Greiman
+
3  * Modified by: Teja Chiluvuri
+
4 
+
5  * This file is part of the Arduino SoftI2cMaster Library
+
6  *
+
7  * This Library is free software: you can redistribute it and/or modify
+
8  * it under the terms of the GNU General Public License as published by
+
9  * the Free Software Foundation, either version 3 of the License, or
+
10  * (at your option) any later version.
+
11  *
+
12  * This Library is distributed in the hope that it will be useful,
+
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+
15  * GNU General Public License for more details.
+
16  *
+
17  * You should have received a copy of the GNU General Public License
+
18  * along with the Arduino SoftI2cMaster Library. If not, see
+
19  * <http://www.gnu.org/licenses/>.
+
20  */
+
21 #ifndef SOFT_I2C_MASTER
+
22 #define SOFT_I2C_MASTER
+
23 #if defined(ARDUINO) && ARDUINO >= 100
+
24 #include "Arduino.h"
+
25 #else
+
26 #include "WProgram.h"
+
27 #endif
+
28 #include <stddef.h>
+
29 
+
30 // delay used to tweek signals
+
31 #define I2C_DELAY_USEC 30
+
32 
+
33 // R/W direction bit to OR with address for start or restart
+
34 #define I2C_READ 1
+
35 #define I2C_WRITE 0
+
36 
+ +
41 
+
42  bool initialized;
+
43 private:
+
44  uint8_t sclPin_;
+
45  uint8_t sdaPin_;
+
46  uint8_t deviceAddr;
+
47  uint8_t _error_code; // Error code
+
48 
+
49 public:
+
51  uint8_t* _so_buffer;
+
52 
+
54  uint8_t start(uint8_t addressRW);
+
55 
+
57  void stop(void);
+
58 
+
60  uint8_t restart(uint8_t addressRW);
+
61 
+
63  uint8_t write(uint8_t b);
+
64 
+
66  uint8_t read(uint8_t last);
+
67 
+
69  SoftI2cMaster(uint8_t devAddr);
+
70 
+
72  void initProtocol(uint8_t sclPin = NULL, uint8_t sdaPin = NULL);
+
73 
+
75  uint8_t* readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t* buf = NULL);
+
76 
+
78  bool writeRegistersWithLocation(int bytes, uint8_t* buf);
+
79 
+
81  bool writeRegisters (uint8_t location, uint8_t bytes_to_write,
+
82  uint8_t* buffer = 0);
+
83 
+
85  bool writeByte (uint8_t location, uint8_t data);
+
86 
+
88  bool writeInteger(uint8_t location, uint16_t data);
+
89 
+
91  bool writeLong (uint8_t location, uint32_t data);
+
92 
+
94  char* readString(uint8_t startRegister, uint8_t bytes, uint8_t* buf = NULL, uint8_t len=0);
+
95 
+
97  uint8_t readByte (uint8_t location);
+
98 
+
100  int16_t readInteger (uint8_t location);
+
101 
+
103  uint32_t readLong (uint8_t location);
+
104 
+
106  char* getFirmwareVersion();
+
107 
+
109  char* getVendorID();
+
110 
+
112  char* getDeviceID();
+
113 
+
115  uint8_t getWriteErrorCode();
+
116 
+
117  bool checkAddress();
+
118 
+
122  bool setAddress(uint8_t address);
+
123 };
+
124 #endif //SOFT_I2C_MASTER
+
This class implements software i2c interface used by EVShield/NXShield on Arduino.
Definition: SoftI2cMaster.h:40
+
void stop(void)
Definition: SoftI2cMaster.cpp:119
+
char * readString(uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
Definition: SoftI2cMaster.cpp:241
+
uint8_t restart(uint8_t addressRW)
Definition: SoftI2cMaster.cpp:95
+
bool writeByte(uint8_t location, uint8_t data)
Definition: SoftI2cMaster.cpp:211
+
int16_t readInteger(uint8_t location)
Definition: SoftI2cMaster.cpp:262
+
uint8_t write(uint8_t b)
Definition: SoftI2cMaster.cpp:128
+
char * getFirmwareVersion()
Definition: SoftI2cMaster.cpp:294
+
void initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
Definition: SoftI2cMaster.cpp:34
+
uint8_t readByte(uint8_t location)
Definition: SoftI2cMaster.cpp:253
+
char * getDeviceID()
Definition: SoftI2cMaster.cpp:304
+
uint8_t read(uint8_t last)
Definition: SoftI2cMaster.cpp:69
+
bool checkAddress()
Definition: SoftI2cMaster.cpp:311
+
bool writeRegisters(uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
Definition: SoftI2cMaster.cpp:197
+
bool setAddress(uint8_t address)
Definition: SoftI2cMaster.cpp:321
+
bool writeRegistersWithLocation(int bytes, uint8_t *buf)
Definition: SoftI2cMaster.cpp:186
+
uint32_t readLong(uint8_t location)
Definition: SoftI2cMaster.cpp:272
+
uint8_t * readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
Definition: SoftI2cMaster.cpp:154
+
uint8_t * _so_buffer
Definition: SoftI2cMaster.h:51
+
uint8_t getWriteErrorCode()
Definition: SoftI2cMaster.cpp:287
+
bool writeInteger(uint8_t location, uint16_t data)
Definition: SoftI2cMaster.cpp:218
+
uint8_t start(uint8_t addressRW)
Definition: SoftI2cMaster.cpp:110
+
bool writeLong(uint8_t location, uint32_t data)
Definition: SoftI2cMaster.cpp:228
+
char * getVendorID()
Definition: SoftI2cMaster.cpp:299
+
SoftI2cMaster(uint8_t devAddr)
Definition: SoftI2cMaster.cpp:27
+
+
+ + + + diff --git a/html/annotated.html b/html/annotated.html new file mode 100644 index 0000000..98561e8 --- /dev/null +++ b/html/annotated.html @@ -0,0 +1,165 @@ + + + + + + +EVShield: Class List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCaccl
oCBaseI2CDeviceThis class implements hardware I2C protocol used by EVShield/NXShield on an Arduino
oCcmps
oCcolor
oCEVs_AbsoluteIMUThis class interfaces with AbsoluteIMU sensor attached to EVShield
oCEVs_AngleSensorThis class interfaces with sensor attached to EVShield
oCEVs_CurrentMeterThis class interfaces with sensor attached to EVShield
oCEVs_DISTNxThis class interfaces with DIST-Nx attached to EVShield
oCEVs_EV3ColorThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCEVs_EV3GyroThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCEVs_EV3InfraredThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCEVs_EV3TouchThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCEVs_EV3UltrasonicThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCEVs_LightSensorArrayThis class interfaces with LightSensorArray attached to EVShield
oCEVs_LineLeaderThis class interfaces with NXTLineLeader sensor attached to EVShield
oCEVs_MagicWandThis class interfaces with Magic Wand attached to EVShield
oCEVs_NumericPadThis class interfaces with NumericPad attached to EVShield
oCEVs_NXTCamThis class interfaces with NXTCam attached to EVShield
oCEVs_NXTColorEVShield Analog Sensor class
oCEVs_NXTLightThis class interfaces with LEGO Light sensor attached to EVShield
oCEVs_NXTMMXThis class interfaces with NXTMMX attached to EVShield
oCEVs_NXTServoThis class interfaces with NXTServo attached to EVShield
oCEVs_NXTTouchThis class interfaces with LEGO NXT Touch sensor attached to EVShield
oCEVs_PFMateThis class interfaces with PFMate attached to EVShield
oCEVs_PiLightThis class interfaces with PiLight sensor attached to EVShield
oCEVs_PSPNxThis class interfaces with PSP-Nx attached to EVShield
oCEVs_RTCThis class interfaces with RTC attached to EVShield
oCEVs_SumoEyesThis class interfaces with EVTSumoEyes sensor attached to EVShield
oCEVs_VoltMeterThis class interfaces with sensor attached to EVShield
oCEVShieldThis class defines methods to access EVShield features
oCEVShieldAGSEVShield Analog Sensor class
oCEVShieldBankThis class defines methods for the EVShield Bank(s)
oCEVShieldBankBEVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods for the EVShield Bank B
oCEVShieldI2CThis class implements I2C interfaces used by EVShield
oCEVShieldUARTEVShield UART Sensor class. also provides support for the EV3 Touch Sensor
oCgyro
oCmagnetic_field
\CSoftI2cMasterThis class implements software i2c interface used by EVShield/NXShield on Arduino
+
+
+
+ + + + diff --git a/html/annotated.js b/html/annotated.js new file mode 100644 index 0000000..b2b9ddc --- /dev/null +++ b/html/annotated.js @@ -0,0 +1,41 @@ +var annotated = +[ + [ "accl", "structaccl.html", "structaccl" ], + [ "BaseI2CDevice", "class_base_i2_c_device.html", "class_base_i2_c_device" ], + [ "cmps", "structcmps.html", "structcmps" ], + [ "color", "structcolor.html", "structcolor" ], + [ "EVs_AbsoluteIMU", "class_e_vs___absolute_i_m_u.html", "class_e_vs___absolute_i_m_u" ], + [ "EVs_AngleSensor", "class_e_vs___angle_sensor.html", "class_e_vs___angle_sensor" ], + [ "EVs_CurrentMeter", "class_e_vs___current_meter.html", "class_e_vs___current_meter" ], + [ "EVs_DISTNx", "class_e_vs___d_i_s_t_nx.html", "class_e_vs___d_i_s_t_nx" ], + [ "EVs_EV3Color", "class_e_vs___e_v3_color.html", "class_e_vs___e_v3_color" ], + [ "EVs_EV3Gyro", "class_e_vs___e_v3_gyro.html", "class_e_vs___e_v3_gyro" ], + [ "EVs_EV3Infrared", "class_e_vs___e_v3_infrared.html", "class_e_vs___e_v3_infrared" ], + [ "EVs_EV3Touch", "class_e_vs___e_v3_touch.html", "class_e_vs___e_v3_touch" ], + [ "EVs_EV3Ultrasonic", "class_e_vs___e_v3_ultrasonic.html", "class_e_vs___e_v3_ultrasonic" ], + [ "EVs_LightSensorArray", "class_e_vs___light_sensor_array.html", "class_e_vs___light_sensor_array" ], + [ "EVs_LineLeader", "class_e_vs___line_leader.html", "class_e_vs___line_leader" ], + [ "EVs_MagicWand", "class_e_vs___magic_wand.html", "class_e_vs___magic_wand" ], + [ "EVs_NumericPad", "class_e_vs___numeric_pad.html", "class_e_vs___numeric_pad" ], + [ "EVs_NXTCam", "class_e_vs___n_x_t_cam.html", "class_e_vs___n_x_t_cam" ], + [ "EVs_NXTColor", "class_e_vs___n_x_t_color.html", "class_e_vs___n_x_t_color" ], + [ "EVs_NXTLight", "class_e_vs___n_x_t_light.html", "class_e_vs___n_x_t_light" ], + [ "EVs_NXTMMX", "class_e_vs___n_x_t_m_m_x.html", "class_e_vs___n_x_t_m_m_x" ], + [ "EVs_NXTServo", "class_e_vs___n_x_t_servo.html", "class_e_vs___n_x_t_servo" ], + [ "EVs_NXTTouch", "class_e_vs___n_x_t_touch.html", "class_e_vs___n_x_t_touch" ], + [ "EVs_PFMate", "class_e_vs___p_f_mate.html", "class_e_vs___p_f_mate" ], + [ "EVs_PiLight", "class_e_vs___pi_light.html", "class_e_vs___pi_light" ], + [ "EVs_PSPNx", "class_e_vs___p_s_p_nx.html", "class_e_vs___p_s_p_nx" ], + [ "EVs_RTC", "class_e_vs___r_t_c.html", "class_e_vs___r_t_c" ], + [ "EVs_SumoEyes", "class_e_vs___sumo_eyes.html", "class_e_vs___sumo_eyes" ], + [ "EVs_VoltMeter", "class_e_vs___volt_meter.html", "class_e_vs___volt_meter" ], + [ "EVShield", "class_e_v_shield.html", "class_e_v_shield" ], + [ "EVShieldAGS", "class_e_v_shield_a_g_s.html", "class_e_v_shield_a_g_s" ], + [ "EVShieldBank", "class_e_v_shield_bank.html", "class_e_v_shield_bank" ], + [ "EVShieldBankB", "class_e_v_shield_bank_b.html", "class_e_v_shield_bank_b" ], + [ "EVShieldI2C", "class_e_v_shield_i2_c.html", "class_e_v_shield_i2_c" ], + [ "EVShieldUART", "class_e_v_shield_u_a_r_t.html", "class_e_v_shield_u_a_r_t" ], + [ "gyro", "structgyro.html", "structgyro" ], + [ "magnetic_field", "structmagnetic__field.html", "structmagnetic__field" ], + [ "SoftI2cMaster", "class_soft_i2c_master.html", "class_soft_i2c_master" ] +]; \ No newline at end of file diff --git a/html/bc_s.png b/html/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..224b29aa9847d5a4b3902efd602b7ddf7d33e6c2 GIT binary patch literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT literal 0 HcmV?d00001 diff --git a/html/bdwn.png b/html/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
BaseI2CDevice Member List
+
+
+ +

This is the complete list of members for BaseI2CDevice, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress()BaseI2CDevice
getAddress()BaseI2CDevice
getDeviceID()BaseI2CDevice
getFeatureSet()BaseI2CDevice
getFirmwareVersion()BaseI2CDevice
getVendorID()BaseI2CDevice
getWriteErrorCode()BaseI2CDevice
initProtocol()BaseI2CDevice
readByte(uint8_t location)BaseI2CDevice
readInteger(uint8_t location)BaseI2CDevice
readLong(uint8_t location)BaseI2CDevice
readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)BaseI2CDevice
setAddress(uint8_t i2c_address)BaseI2CDevice
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
writeByte(uint8_t location, uint8_t data)BaseI2CDevice
writeInteger(uint8_t location, uint16_t data)BaseI2CDevice
writeLong(uint8_t location, uint32_t data)BaseI2CDevice
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)BaseI2CDevice
+
+ + + + diff --git a/html/class_base_i2_c_device.html b/html/class_base_i2_c_device.html new file mode 100644 index 0000000..f361f5e --- /dev/null +++ b/html/class_base_i2_c_device.html @@ -0,0 +1,761 @@ + + + + + + +EVShield: BaseI2CDevice Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ + +
+ +

This class implements hardware I2C protocol used by EVShield/NXShield on an Arduino. + More...

+ +

#include <BaseI2CDevice.h>

+
+Inheritance diagram for BaseI2CDevice:
+
+
+ + +EVShieldI2C +EVs_AbsoluteIMU +EVs_AngleSensor +EVs_CurrentMeter +EVs_DISTNx +EVs_LightSensorArray +EVs_LineLeader +EVs_MagicWand +EVs_NumericPad +EVs_NXTCam +EVs_NXTMMX +EVs_NXTServo +EVs_PFMate +EVs_PiLight +EVs_PSPNx +EVs_RTC +EVs_VoltMeter +EVShieldBank + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
+ + + + + +

+Static Public Attributes

static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
+ + + +

+Protected Member Functions

void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class implements hardware I2C protocol used by EVShield/NXShield on an Arduino.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
BaseI2CDevice::BaseI2CDevice (uint8_t i2c_address)
+
+

constructor for the BaseI2C Device class; requires the i2c address of the device

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool BaseI2CDevice::checkAddress ()
+
+

validate if a device is attached to the i2c bus with the specified i2c address

+

checkAddress() this function checks to see if there is any device at its specified address

+ +
+
+ +
+
+ + + + + + + +
uint8_t BaseI2CDevice::getAddress ()
+
+

returns the current address for this instance of BaseI2CDevice

+ +
+
+ +
+
+ + + + + + + +
char * BaseI2CDevice::getDeviceID ()
+
+

get the name of the device

+ +
+
+ +
+
+ + + + + + + +
char * BaseI2CDevice::getFeatureSet ()
+
+

returns the features on the device, not supported by all devices

+

returns a string indicating the features on this device some devices may return null.

+ +
+
+ +
+
+ + + + + + + +
char * BaseI2CDevice::getFirmwareVersion ()
+
+

return the firware version id of the device

+ +
+
+ +
+
+ + + + + + + +
char * BaseI2CDevice::getVendorID ()
+
+

return the name of the vendor for the device

+ +
+
+ +
+
+ + + + + + + +
uint8_t BaseI2CDevice::getWriteErrorCode ()
+
+

returns the error code for an error with the Wire.h library on the i2c bus

+ +
+
+ +
+
+ + + + + + + +
void BaseI2CDevice::initProtocol ()
+
+

initialize hardware i2c using the Wire.h library

+ +
+
+ +
+
+ + + + + + + + +
uint8_t BaseI2CDevice::readByte (uint8_t location)
+
+

Read a byte from specified location

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
a byte value read from the location
+ +
+
+ +
+
+ + + + + + + + +
int16_t BaseI2CDevice::readInteger (uint8_t location)
+
+

Read an integer from specified location. Integer comprises of 2 bytes.

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
an integer value read from the location
+ +
+
+ +
+
+ + + + + + + + +
uint32_t BaseI2CDevice::readLong (uint8_t location)
+
+

Read a long from specified location. Long comprises of 4 bytes.

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
a long value read from the location
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t * BaseI2CDevice::readRegisters (uint8_t start_register,
uint8_t bytes_to_read,
uint8_t * buffer = 0,
uint8_t buffer_length = 0,
bool clear_buffer = false 
)
+
+

read specified number of bytes from the start register.

+
Parameters
+ + + + + + +
start_registerlocation to start reading from
bytes_to_readNumber of bytes to read (max 16 for LEGO compatible devices)
buffer(optional) buffer to read the data into
buffer_length(optional) length of the buffer if it was provided
clear_buffer(optional) to clear the buffer or not before using.
+
+
+
Returns
pointer to data buffer that was read. If buffer was not provided, this is internal pointer.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
char * BaseI2CDevice::readString (uint8_t location,
uint8_t bytes_to_read,
uint8_t * buffer = 0,
uint8_t buffer_length = 0 
)
+
+

Read a string from specified location

+
Parameters
+ + + + + +
locationaddress to read at
bytes_to_readnumber of bytes to read
bufferoptional, a buffer to read the data into.
buffer_lengthoptional, length of the buffer supplied.
+
+
+
Returns
a char array read from the location
+ +
+
+ +
+
+ + + + + + + + +
bool BaseI2CDevice::setAddress (uint8_t i2c_address)
+
+
set the i2c address for this device 
+
Parameters
+ + +
i2c_addressnew device address.
+
+
+

setAddress(address) this function set's the i2c address for this instance to given address Note that, generally i2c address of a physical device does not change. Use this function if there are multiple devices on your bus and you want to conserve processor memory from instantiating another class instance.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
void BaseI2CDevice::setWriteErrorCode (uint8_t code)
+
+protected
+
+

write the internal error code

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool BaseI2CDevice::writeByte (uint8_t location,
uint8_t data 
)
+
+
write one byte to the specified register location
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool BaseI2CDevice::writeInteger (uint8_t location,
uint16_t data 
)
+
+
write two bytes (int) to the specified register location
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool BaseI2CDevice::writeLong (uint8_t location,
uint32_t data 
)
+
+
write four bytes (long) to the specified register location 
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool BaseI2CDevice::writeRegisters (uint8_t start_register,
uint8_t bytes_to_write,
uint8_t * buffer = 0 
)
+
+
write data bytes to the i2c device starting from the start register
+
Parameters
+ + + + +
start_registerlocation to write at.
bytes_to_writeNumber of bytes to write
buffer(optional) data buffer, if not supplied, data from internal buffer is used.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
uint8_t * BaseI2CDevice::_buffer = 0
+
+static
+
+

Buffer used for data that is returned from I2C commands

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_base_i2_c_device.js b/html/class_base_i2_c_device.js new file mode 100644 index 0000000..310abde --- /dev/null +++ b/html/class_base_i2_c_device.js @@ -0,0 +1,23 @@ +var class_base_i2_c_device = +[ + [ "BaseI2CDevice", "class_base_i2_c_device.html#a62f63fa5bcbea73b209d44c70ae1def3", null ], + [ "checkAddress", "class_base_i2_c_device.html#a6f47145afd71007190cf44383abcc8ae", null ], + [ "getAddress", "class_base_i2_c_device.html#aa282bb683e22262748497ed1ae433e15", null ], + [ "getDeviceID", "class_base_i2_c_device.html#a05ff39442c78410f4bdaf5c7c3fb8340", null ], + [ "getFeatureSet", "class_base_i2_c_device.html#a132997ab07e64603dce91883fc501d3c", null ], + [ "getFirmwareVersion", "class_base_i2_c_device.html#a78ea4709eb2d59cdceb02fa1fee175c7", null ], + [ "getVendorID", "class_base_i2_c_device.html#ab21b79094ec9841e0cb43bb67609c51f", null ], + [ "getWriteErrorCode", "class_base_i2_c_device.html#ae0bb486dda6232cc3bd4e7b95521af95", null ], + [ "initProtocol", "class_base_i2_c_device.html#acc95ab6f1986f38403daead419e316ac", null ], + [ "readByte", "class_base_i2_c_device.html#a427f3ff65f3bed8d26e6697397a16132", null ], + [ "readInteger", "class_base_i2_c_device.html#ac1c36cb13ead55f0a2b76b959e76aa5a", null ], + [ "readLong", "class_base_i2_c_device.html#aef9ddea43fc84deb005f794b80ecf232", null ], + [ "readRegisters", "class_base_i2_c_device.html#abb9bad3def0eebbc54b05738e5da8823", null ], + [ "readString", "class_base_i2_c_device.html#a462c3c8ff525fdf274953318f8b4ab6d", null ], + [ "setAddress", "class_base_i2_c_device.html#abd6f0e41391e8a232913d12cec872615", null ], + [ "setWriteErrorCode", "class_base_i2_c_device.html#a71a6513f582b2c7974e41001996cc78d", null ], + [ "writeByte", "class_base_i2_c_device.html#a8058ca5d0986f71307bc36c40832d25d", null ], + [ "writeInteger", "class_base_i2_c_device.html#a5ff01e20693bcfc4684460fc6b29ae72", null ], + [ "writeLong", "class_base_i2_c_device.html#abcfea2377442933e1e6a46f072ee08f7", null ], + [ "writeRegisters", "class_base_i2_c_device.html#ae57180c78fa931acc5be5683717e6534", null ] +]; \ No newline at end of file diff --git a/html/class_base_i2_c_device.png b/html/class_base_i2_c_device.png new file mode 100644 index 0000000000000000000000000000000000000000..48ba3f3e92e2c83108ea49bb66ff7848b8276d08 GIT binary patch literal 6630 zcmdT}3s6(%x{cL}_<){z3Wx%pdJ0v_GZ7F-u=RmR00k-*MHGY(o+1eWLI6vZh`0?AVu%_c21p{0@JL8i4})#Od+hzxKWT-8FHRgkc++ZN zD`K@w)63nTVN4zka_5?TQ(Lxj7tV;AV4A$cf97OT@MDHS^(jO~;;6!gzl0ZO`+`a1Dn zB)Auw;Z&>-ybC@O-O&Ub#Hy|KU-A5H+0!X z-%B>S@T61c#ib22s&9#ZXqa#AcOE;Bm~$R7OT3GybV(8pnZPe|$ll0hNCg48l2Yu? z9m#yYscef4e`_4!3R7l;X6bZB%Q7R4PXxOZJcfI6L?$`d2b&zTFD0lxv8WzrJKr8g zq>nF7k+CQn&C>`)dDu)nyj1z2TPS(|x8wTGMqsKg^~?#XpUT7i6j}dkL%*0nih)gU z=L>*w&8z-9Y@-8`2=Y7enx=8aTwkTa^3@)X{&vIKh1oBN^<6LQR%~g7?_QY{Py+K6 zC6vKF3w!4PX*);vF)8ewg-`dr^RMr8w;nOiI9dV=3HxIfO}jwb^KkeheYtjzB z22r~wmr&=RG-i|V(s*5wVYtYE*qq6e*3+f=+apR(xJ_6B6IADaf?=4{tKA9wlG|Xj zfXnFVbJ`*ksaJu~!@sc0aq46Sq1)x}AU=i+zxH=CnC3$;CB@2uzw+t*=q5t?#z&QD z+2T|b)zJ&j-v$bYU6Vi2Go343IsSbG_Rdcz{QX5t;)@W42`+}b`c^_~Ra~1)xS2C8 zAu!rg3ia~>;t*a%dZ}YUljO?Ep$lc{r~k+F zzD2uWx0<#HY7~fAQ+NfG1mTYn0mG+T!rM~PLB8Oe`$=C_ zrx>OM-(j_Xb4|rd&3j8v9_nZXG8GLw*05{i^(jb|mpjaV5qbxV@r6?hrLd+5qB+N> z=5_r+#TYF>SFzaKL|0!Cb)tLfru_DVV|n_g@?;lGV6<7WbZ@@ zkTgH#P;cBh<##R94*BIHZ@$U^&9bRR$&8}FQt@I0`TN+F5q(vPy38Dax0Jj~T$s&? zzN>No7gJGj3=5=*@ukPFG>Y{* z#Qy0&ZnKBf!`-uf+-E%E*9P(i%()xdQa00;a{sC`?f*sm-rTyctplLG@pOGV+5JxDS zNjF;8cT7D-nYw2WHPctdv`-|;B>L#!R*lYF5009lpNU!3CWs$xCy6R&*f`dGjl&HL zL4t+!x`Q0b>hnF7eCje>P~tNklm}pAUCVH6L~Yk|_1Yw(-Oaj5lrLxevODWdUSdCN z2^1B?wzeW?Qx^mC3%c)&J|x=&GK{@gRjE)P3=0f)+6t1qA9;1(v9qv0avv@4V zP7FBm{QxCpS{_AT*dAYu6?pg`(;Jbay6 z^1LocFl~tz%`CQKY3!8KDRyGh3j=3o&ae)${tDokfa2+yMw9#pi=xDKl$*;`2f-6R02VM# zYqg}dDi|rHhLTP3vG$m@^=&LQ{za~ZK@j^FnLjB)1HtQ5-j14I8ph{YciOtOQImJA zB`_S2R984)Ir{!sA{!BF(7fdgf^UYm6OZi?Gaq!G4irqUTShn^X@BiRs3S1i#jYA_ zpsCIeAUY$0CuQP9e0z0Uix72WD1-m~UIEuS#2k52>(940+2~=Ch~;R}5L&ns*J`Tf=<5 z8=c)#R$R-_M>o?`**(u2G>zDur_I00!cWAv@nz1oVC1u_7JSuG_5d#EZaU?a1DAW{ zqge?Pa;SYO;T2fb9QD9RhgiK9jEQM;dzNzlT2YlUMwlz0@QBhDG!25W__kf)>a1}$ z&R+mfzuyBI<-&jQ6GOdie0InZG~Qc=5@ZO6j&TLT^Q`bD7lx<&3l|Kz{DtCS^AkUy z3SEyyVA`bC`PQ8nMm@uy+Bl=d)L^3T>}Sldg9jOAUSOuRIbZ11Y84Pru_&eI0W*uK zBM44_mbcfqRrBbcV2bI8nl-Apgk^ryQQAn$o?|-jsc}g0APd|Kn0?~o66UMw)9Z$a zIy>mA;yROmGuAGXc#Xc~lni!PN&w9$K z!#lxewq_p%cZoKDc*IC-yI?M@)Fe}k>MBHY`MOc|o3RFhG*QFEORh2?t}>A|KF;R9 zay1gce-G1pWjjrARZ`q9nn?!zsq?)JUnV6jbidDBxElvw5j~W@A5=)(kff6-XT>d$ z-y0e%i0yFY17q?J2t?4zx`r891W}iF4x;W{;-PA_&tG9^B)?YRgpQWBs5F6MGmXu2 z1Vfb9aVmW0L<)}@28}E`>MhcH5PEc_4X4>88+&2;D{%@-{-C9GRKcvC^Nnql#%*vp-WX_a$v!N76y9_yOaoBtzmYJct(I{3| zpStfw;xEWMJEs6YRheEdL{u|tXPR5}UtkK6{dNkG&2T+I6MYN+;6@_QJ$Ftl|FQE9 zZfMiz;reNzfq4Mk#oEHU;!GN2d`7Paaj`w5?eTG~C^jvjw~b4N5iV1N;&38&Uj$N& zS`ILF&h^ediy0i4wZ)lo0Sh!2FV?U1+ITD5!*RqB8r{161G&kwT=xoVKaGIMMAlEU`x~Lt$7#%@t9KP1;gXXialsYJrF&zZ# z``r6KIK5MhI=|eltC05i`!%(JbZ#6Ma9aY7S-Hgta6$=m%dKdd#?1u*I^9-h{dfR> z_%DEr_i|qJvG&ZgXj;C8;ri8A}%C9Ik|f;A2>4osP3>i>3R)btn6;DSr61a|FwK z8&dDzLIe+|*O6su2rqgg=S<3NMDT6(txAShA@;Out#`d6e}1(4OFT)?H-e+t@U|C> z$0dFY#OItpcUke5NE?fm8wVH8qXv ztsY5V1>p$*?>tZbPyAM3s-&k+1()zGo=@JCglzFq22;kiVbj{f1L87!>}gU_EomU6raN)D+Z(H3p@zCrIE^&4;!f3fNMU4)^VIN_&v>sX9qUi zdlUe0hG!Q525FQC*ZaZ4Q~tRUGC+;56T6zrXxe4%)8 + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShield Member List
+
+
+ +

This is the complete list of members for EVShield, including all inherited members.

+ + + + + + + + + + + + + + +
bank_aEVShield
bank_bEVShield
EVShield(uint8_t i2c_address_a=SH_Bank_A, uint8_t i2c_address_b=SH_Bank_B)EVShield
getButtonState(uint8_t btn)EVShield
I2CTimer()EVShield
init(SH_Protocols protocol=SH_HardwareI2C)EVShield
initLEDTimers()EVShield
initProtocols(SH_Protocols protocol=SH_HardwareI2C)EVShield
ledBreathingPattern()EVShield
ledHeartBeatPattern()EVShield
ledSetRGB(uint8_t red=0, uint8_t green=0, uint8_t blue=0)EVShield
m_protocolEVShield
waitForButtonPress(uint8_t btn, uint8_t led_pattern=0)EVShield
+
+ + + + diff --git a/html/class_e_v_shield.html b/html/class_e_v_shield.html new file mode 100644 index 0000000..0290dda --- /dev/null +++ b/html/class_e_v_shield.html @@ -0,0 +1,450 @@ + + + + + + +EVShield: EVShield Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShield Class Reference
+
+
+ +

This class defines methods to access EVShield features. + More...

+ +

#include <EVShield.h>

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVShield (uint8_t i2c_address_a=SH_Bank_A, uint8_t i2c_address_b=SH_Bank_B)
 
void init (SH_Protocols protocol=SH_HardwareI2C)
 
void initLEDTimers ()
 
void I2CTimer ()
 
void initProtocols (SH_Protocols protocol=SH_HardwareI2C)
 
bool getButtonState (uint8_t btn)
 
void waitForButtonPress (uint8_t btn, uint8_t led_pattern=0)
 
void ledSetRGB (uint8_t red=0, uint8_t green=0, uint8_t blue=0)
 
void ledBreathingPattern ()
 
void ledHeartBeatPattern ()
 
+ + + + + + + +

+Public Attributes

uint8_t m_protocol
 
EVShieldBank bank_a
 
EVShieldBankB bank_b
 
+

Detailed Description

+

This class defines methods to access EVShield features.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
EVShield::EVShield (uint8_t i2c_address_a = SH_Bank_A,
uint8_t i2c_address_b = SH_Bank_B 
)
+
+

class constructor for EVShield; optional custom i2c addresses may be supplied for both banks

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
bool EVShield::getButtonState (uint8_t btn)
+
+

Get the button state of the specific button on EVShield.

+
Parameters
+ + +
btnButton to get state for (BTN_GO, BTN_LEFT, BTN_RIGHT)
+
+
+
Returns
true or false for specified button on the EVShield
+ +
+
+ +
+
+ + + + + + + +
void EVShield::I2CTimer ()
+
+

the initialization of the EVShield I2C timer.

+ +
+
+ +
+
+ + + + + + + + +
void EVShield::init (SH_Protocols protocol = SH_HardwareI2C)
+
+

the initialization of the EVShield; This function initializes the LED related timers, and communication protocols.

+
Parameters
+ + +
protocoloptional, specify the i2c protocol to use for the EVShield and highspeed i2c port
+
+
+ +
+
+ +
+
+ + + + + + + +
void EVShield::initLEDTimers ()
+
+

the initialization of the EVShield LED timers.

+ +
+
+ +
+
+ + + + + + + + +
void EVShield::initProtocols (SH_Protocols protocol = SH_HardwareI2C)
+
+

the initialization of EVShield communication protocols.

+
Parameters
+ + +
protocoloptional, specify the i2c protocol to use for the EVShield and highspeed i2c port
+
+
+ +
+
+ +
+
+ + + + + + + +
void EVShield::ledBreathingPattern ()
+
+

The LED is brightened and dimmed in a breathing pattern. Call this function repeatedly to make the pattern.

+ +
+
+ +
+
+ + + + + + + +
void EVShield::ledHeartBeatPattern ()
+
+

The LED is brightened and dimmed in a HeartBeat pattern. Call this function repeatedly to make the pattern.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void EVShield::ledSetRGB (uint8_t red = 0,
uint8_t green = 0,
uint8_t blue = 0 
)
+
+

Set the colors of LED on the EVShield; The values of red, green, blue are between 0 to 8 (for 8 intensity levels).

+
Parameters
+ + + + +
redIntensity for red color (between 0 and 8)
greenIntensity for green color (between 0 and 8)
blueIntensity for blue color (between 0 and 8)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void EVShield::waitForButtonPress (uint8_t btn,
uint8_t led_pattern = 0 
)
+
+

Wait inside function until specified button is pressed on EVShield (BTN_GO, BTN_LEFT, BTN_RIGHT)

+
Parameters
+ + + +
btnButton to get state for (BTN_GO, BTN_LEFT, BTN_RIGHT)
led_pattern0 for LED off. 1 to brighten/lighten LED with breathing pattern (default). 2 to brighten/lighten LED with heart beat pattern.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
EVShieldBank EVShield::bank_a
+
+

Variable for the bank_a of EVShield

+ +
+
+ +
+
+ + + + +
EVShieldBankB EVShield::bank_b
+
+

Variable for the bank_b of EVShield

+ +
+
+ +
+
+ + + + +
uint8_t EVShield::m_protocol
+
+

Global variable representing the i2c protocol to use; whether software or hardware

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield.js b/html/class_e_v_shield.js new file mode 100644 index 0000000..2a0dfd4 --- /dev/null +++ b/html/class_e_v_shield.js @@ -0,0 +1,16 @@ +var class_e_v_shield = +[ + [ "EVShield", "class_e_v_shield.html#a000222aa9a91c04a3b44ce1649c6356e", null ], + [ "getButtonState", "class_e_v_shield.html#ab68a1603b8a32c5b6717890355c01c0e", null ], + [ "I2CTimer", "class_e_v_shield.html#a8e9804965486516804ec8e34350edfa6", null ], + [ "init", "class_e_v_shield.html#a5d3be5e588e0a84f2809a1ac07a5a8b6", null ], + [ "initLEDTimers", "class_e_v_shield.html#a3a5e2906bd411eb1b1f5a9d968d7de39", null ], + [ "initProtocols", "class_e_v_shield.html#a20e1f0c5ca58e2000949a15101259abd", null ], + [ "ledBreathingPattern", "class_e_v_shield.html#a052e8639e594c1601b5351b273fe20f1", null ], + [ "ledHeartBeatPattern", "class_e_v_shield.html#a447869699a5b7d2a2f0c3e4b5fdad26f", null ], + [ "ledSetRGB", "class_e_v_shield.html#af3a1e13c869f6519e677ca4b5e9809a6", null ], + [ "waitForButtonPress", "class_e_v_shield.html#af6551565c91c30c4dcbf3816f45832ed", null ], + [ "bank_a", "class_e_v_shield.html#afe3be42f832df2caed811d3f0f5c730a", null ], + [ "bank_b", "class_e_v_shield.html#a3609601fe9bff117c01cc97ea9b3d11f", null ], + [ "m_protocol", "class_e_v_shield.html#ad7a310143b78a0c615f278fc979a29da", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_a_g_s-members.html b/html/class_e_v_shield_a_g_s-members.html new file mode 100644 index 0000000..337dba7 --- /dev/null +++ b/html/class_e_v_shield_a_g_s-members.html @@ -0,0 +1,133 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldAGS Member List
+
+
+ +

This is the complete list of members for EVShieldAGS, including all inherited members.

+ + + + + + + + +
EVShieldAGS()EVShieldAGS
EVShieldAGS(EVShield *shield, SH_BankPort bp)EVShieldAGS
init(EVShield *shield, SH_BankPort bp)EVShieldAGS
m_bpEVShieldAGS
mp_shieldEVShieldAGS
readRaw()EVShieldAGS
setType(uint8_t type)EVShieldAGS
+
+ + + + diff --git a/html/class_e_v_shield_a_g_s.html b/html/class_e_v_shield_a_g_s.html new file mode 100644 index 0000000..ccb9293 --- /dev/null +++ b/html/class_e_v_shield_a_g_s.html @@ -0,0 +1,303 @@ + + + + + + +EVShield: EVShieldAGS Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShieldAGS Class Reference
+
+
+ +

EVShield Analog Sensor class. + More...

+ +

#include <EVShieldAGS.h>

+
+Inheritance diagram for EVShieldAGS:
+
+
+ + +EVs_NXTLight +EVs_NXTTouch +EVs_SumoEyes + +
+ + + + + + + + + + + + +

+Public Member Functions

 EVShieldAGS ()
 
 EVShieldAGS (EVShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
int readRaw ()
 
bool init (EVShield *shield, SH_BankPort bp)
 
+ + + + + +

+Public Attributes

EVShieldmp_shield
 
SH_BankPort m_bp
 
+

Detailed Description

+

EVShield Analog Sensor class.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
EVShieldAGS::EVShieldAGS ()
+
+

null constructor for the EVShieldAGS class; need to init later

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
EVShieldAGS::EVShieldAGS (EVShieldshield,
SH_BankPort bp 
)
+
+

class constructor with pointed to EVShield and the bankport as a parameter; init is not needed

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldAGS::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the analog device with a pointed to the EVShield and the bank port it is connected to

+ +
+
+ +
+
+ + + + + + + +
int EVShieldAGS::readRaw ()
+
+

read the raw analog value from the device and return as an integer

+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldAGS::setType (uint8_t type)
+
+

set the type of the device on this port of the EVShield

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
SH_BankPort EVShieldAGS::m_bp
+
+

bank port the analog device is connected to

+ +
+
+ +
+
+ + + + +
EVShield* EVShieldAGS::mp_shield
+
+

pointer to the EVShield class instantiation used

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield_a_g_s.js b/html/class_e_v_shield_a_g_s.js new file mode 100644 index 0000000..93c7da7 --- /dev/null +++ b/html/class_e_v_shield_a_g_s.js @@ -0,0 +1,10 @@ +var class_e_v_shield_a_g_s = +[ + [ "EVShieldAGS", "class_e_v_shield_a_g_s.html#aaa6232b66c816f37c377c15080f155b5", null ], + [ "EVShieldAGS", "class_e_v_shield_a_g_s.html#aeb8e3043abc60f37b47e102da29665c9", null ], + [ "init", "class_e_v_shield_a_g_s.html#a8964c93c41ea430a6094dd25b182a47b", null ], + [ "readRaw", "class_e_v_shield_a_g_s.html#a582b49a30aa85da8d4c4025165e9e29b", null ], + [ "setType", "class_e_v_shield_a_g_s.html#aac870812ae399a846345e2a79cbfb052", null ], + [ "m_bp", "class_e_v_shield_a_g_s.html#ae01eca8d5787596f3b2365bf33450fea", null ], + [ "mp_shield", "class_e_v_shield_a_g_s.html#a7d691774bba4bb0810fed780a47b778f", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_a_g_s.png b/html/class_e_v_shield_a_g_s.png new file mode 100644 index 0000000000000000000000000000000000000000..1828936c22ef70d16cf7e39aa0cd87688a599e46 GIT binary patch literal 942 zcmeAS@N?(olHy`uVBq!ia0y~yU~~hr12~w0WY9;Q4?s#Hz$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-opgA+#+~VjcT~ru-m=2T zu;kR#!h_x>g)eb)!e&bV!vzev7G|i>$3x=eX4mA z(R;O@ar52S$2s}`BDQY|@41#=v-<6_y%)1K-jD9(2}s`JZaS?l{np)}hSN$ZS7xTJ z$XmZ~6%`3~|Q{ZI~>8eu-JlWmhHglwyv^L&5npZ)unD_^eC&sKiB;Mn!bcK2yZ=K1zMz4umm#_7EH$0a4Z zUPRhlR<hbnR1;TfbbisPmGiRe&b;PWZ@Nz3(RS;e+u3uTr1FIw zKdB=;vp&J@ltB7tG3C@HOBGge@4oTrhFMi|Fk5QRy6s=2%n!wXTQxayx76#vbI){@ zv>m@OPCd5Ec>mh081DtTe`@}?n#x`K5qIskRQ$8A!YfS8!gc(g%%8sNPW9%0*KA*J zmf}yX4M?6{?yxx5>?((~)akj~1OI2{Wc_bA792VE*uU6n`}2H1<{wkuyYbHFx+=pA zY4@u$;@4eypL$ih^j!9}x8|RgT~2j)Y_Nat>z``1-iuXsW?G*+2Mkv$z0;g9d>{`D|@_v_yuZ(UDW`_Dn%m)Kz8FAR(j qUr>bb_i8RJu}q5sk@wI2W?r_$Y45K`F57{bi^0>?&t;ucLK6V)(7!PN literal 0 HcmV?d00001 diff --git a/html/class_e_v_shield_bank-members.html b/html/class_e_v_shield_bank-members.html new file mode 100644 index 0000000..9e13003 --- /dev/null +++ b/html/class_e_v_shield_bank-members.html @@ -0,0 +1,205 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldBank Member List
+
+
+ +

This is the complete list of members for EVShieldBank, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
centerLedSetRGB(uint8_t R, uint8_t G, uint8_t B) (defined in EVShieldBank)EVShieldBank
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVShieldBank(uint8_t i2c_address=SH_Bank_A)EVShieldBank
evshieldGetBatteryVoltage()EVShieldBank
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
EVShieldIssueCommand(char command)EVShieldBank
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
ledSetRGB(uint8_t R, uint8_t G, uint8_t B) (defined in EVShieldBank)EVShieldBank
m_protocolEVShieldI2C
motorGetCommandRegA(SH_Motor which_motor)EVShieldBank
motorGetCommandRegB(SH_Motor which_motor)EVShieldBank
motorGetEncoderPosition(SH_Motor which_motor)EVShieldBank
motorGetEncoderTarget(SH_Motor which_motor)EVShieldBank
motorGetSpeed(SH_Motor which_motor)EVShieldBank
motorGetStatusByte(SH_Motor which_motor)EVShieldBank
motorGetTasksRunningByte(SH_Motor which_motor)EVShieldBank
motorGetTimeToRun(SH_Motor which_motor)EVShieldBank
motorIsTachoDone(SH_Motor which_motors)EVShieldBank
motorIsTimeDone(SH_Motor which_motors)EVShieldBank
motorReset()EVShieldBank
motorResetEncoder(SH_Motor which_motor)EVShieldBank
motorRunDegrees(SH_Motor which_motors, SH_Direction direction, int speed, long degrees, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunRotations(SH_Motor which_motors, SH_Direction direction, int speed, long rotations, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunSeconds(SH_Motor which_motors, SH_Direction direction, int speed, uint8_t duration, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunTachometer(SH_Motor which_motors, SH_Direction direction, int speed, long tachometer, SH_Move relative, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunUnlimited(SH_Motor which_motors, SH_Direction direction, int speed)EVShieldBank
motorSetCommandRegA(SH_Motor which_motor, uint8_t value)EVShieldBank
motorSetCommandRegB(SH_Motor which_motor, uint8_t value)EVShieldBank
motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVShieldBank
motorSetEncoderSpeedTimeAndControl(SH_Motor which_motors, long encoder, int speed, uint8_t duration, uint8_t control)EVShieldBank
motorSetEncoderTarget(SH_Motor which_motor, long target)EVShieldBank
motorSetPassCount(uint8_t pass_count)EVShieldBank
motorSetSpeed(SH_Motor which_motor, int speed)EVShieldBank
motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVShieldBank
motorSetSpeedTimeAndControl(SH_Motor which_motors, int speed, uint8_t duration, uint8_t control)EVShieldBank
motorSetTimeToRun(SH_Motor which_motor, int seconds)EVShieldBank
motorSetTolerance(uint8_t tolerance)EVShieldBank
motorStartBothInSync()EVShieldBank
motorStop(SH_Motor which_motors, SH_Next_Action next_action)EVShieldBank
motorWaitUntilTachoDone(SH_Motor which_motors)EVShieldBank
motorWaitUntilTimeDone(SH_Motor which_motors)EVShieldBank
mp_shieldEVShieldI2C
nxshieldGetBatteryVoltage()EVShieldBank
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
sensorReadRaw(uint8_t which_sensor)EVShieldBank
sensorSetType(uint8_t which_sensor, uint8_t sensor_type)EVShieldBank
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_v_shield_bank.html b/html/class_e_v_shield_bank.html new file mode 100644 index 0000000..36634d3 --- /dev/null +++ b/html/class_e_v_shield_bank.html @@ -0,0 +1,1606 @@ + + + + + + +EVShield: EVShieldBank Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShieldBank Class Reference
+
+
+ +

This class defines methods for the EVShield Bank(s). + More...

+ +

#include <EVShield.h>

+
+Inheritance diagram for EVShieldBank:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster +EVShieldBankB + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVShieldBank (uint8_t i2c_address=SH_Bank_A)
 
int evshieldGetBatteryVoltage ()
 
int nxshieldGetBatteryVoltage ()
 
uint8_t EVShieldIssueCommand (char command)
 
bool motorSetEncoderTarget (SH_Motor which_motor, long target)
 
long motorGetEncoderTarget (SH_Motor which_motor)
 
bool motorSetSpeed (SH_Motor which_motor, int speed)
 
int8_t motorGetSpeed (SH_Motor which_motor)
 
bool motorSetTimeToRun (SH_Motor which_motor, int seconds)
 
uint8_t motorGetTimeToRun (SH_Motor which_motor)
 
bool motorSetCommandRegB (SH_Motor which_motor, uint8_t value)
 
uint8_t motorGetCommandRegB (SH_Motor which_motor)
 
bool motorSetCommandRegA (SH_Motor which_motor, uint8_t value)
 
uint8_t motorGetCommandRegA (SH_Motor which_motor)
 
int32_t motorGetEncoderPosition (SH_Motor which_motor)
 
uint8_t motorGetStatusByte (SH_Motor which_motor)
 
uint8_t motorGetTasksRunningByte (SH_Motor which_motor)
 
bool motorSetEncoderPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
bool motorSetSpeedPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
+bool centerLedSetRGB (uint8_t R, uint8_t G, uint8_t B)
 
+bool ledSetRGB (uint8_t R, uint8_t G, uint8_t B)
 
bool motorSetPassCount (uint8_t pass_count)
 
bool motorSetTolerance (uint8_t tolerance)
 
bool motorReset ()
 
bool motorStartBothInSync ()
 
bool motorResetEncoder (SH_Motor which_motor)
 
bool motorSetSpeedTimeAndControl (SH_Motor which_motors, int speed, uint8_t duration, uint8_t control)
 
bool motorSetEncoderSpeedTimeAndControl (SH_Motor which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
 
uint8_t motorIsTimeDone (SH_Motor which_motors)
 
uint8_t motorWaitUntilTimeDone (SH_Motor which_motors)
 
uint8_t motorIsTachoDone (SH_Motor which_motors)
 
uint8_t motorWaitUntilTachoDone (SH_Motor which_motors)
 
void motorRunUnlimited (SH_Motor which_motors, SH_Direction direction, int speed)
 
uint8_t motorRunSeconds (SH_Motor which_motors, SH_Direction direction, int speed, uint8_t duration, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunTachometer (SH_Motor which_motors, SH_Direction direction, int speed, long tachometer, SH_Move relative, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunDegrees (SH_Motor which_motors, SH_Direction direction, int speed, long degrees, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunRotations (SH_Motor which_motors, SH_Direction direction, int speed, long rotations, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
bool motorStop (SH_Motor which_motors, SH_Next_Action next_action)
 
bool sensorSetType (uint8_t which_sensor, uint8_t sensor_type)
 
int sensorReadRaw (uint8_t which_sensor)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class defines methods for the EVShield Bank(s).

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVShieldBank::EVShieldBank (uint8_t i2c_address = SH_Bank_A)
+
+

Constructor for bank a of the EVShield device

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int EVShieldBank::evshieldGetBatteryVoltage ()
+
+

Get the battery voltage (milli-volts) for this bank of the EVShield

+
Returns
voltage value in milli-volts The voltage reported by this function is actual voltage at VIN pin on Arduino This will be lower than your supply voltage due to drops at various points in the circuit. The drop will be different based on where the power source is connected. (i.e. source through EVShield Green connector Vs Arduino black adapater Vs Arduino USB.)
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::EVShieldIssueCommand (char command)
+
+

Issue a command to this bank of the EVShield

+
Parameters
+ + +
commandRefer to user guide for list of commands.
+
+
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorGetCommandRegA (SH_Motor which_motor)
+
+

Get the command register A

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
the last set command register value.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorGetCommandRegB (SH_Motor which_motor)
+
+

Get the command register B

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
the last set command register value.
+ +
+
+ +
+
+ + + + + + + + +
int32_t EVShieldBank::motorGetEncoderPosition (SH_Motor which_motor)
+
+

Get the current encoder position of the motor in degrees

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
current encoder value
+ +
+
+ +
+
+ + + + + + + + +
long EVShieldBank::motorGetEncoderTarget (SH_Motor which_motor)
+
+

Get the target encoder position for the motor

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
long encoder value that the motor is trying to achieve.
+ +
+
+ +
+
+ + + + + + + + +
int8_t EVShieldBank::motorGetSpeed (SH_Motor which_motor)
+
+

Get the speed of the motor

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
the speed value set to the motor
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorGetStatusByte (SH_Motor which_motor)
+
+

Get the current status of the motor

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
The current status of the motor. This is a byte with various bits set based on motor's state. Refer to User Guide for details of bits.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorGetTasksRunningByte (SH_Motor which_motor)
+
+

Get the tasks that are running on the specific motor

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
The task byte that's currently running for this motor. (Currently only one task is supported.)
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorGetTimeToRun (SH_Motor which_motor)
+
+

Get the time in seconds that the motor is running for

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+
Returns
time the motor has been running since last start.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorIsTachoDone (SH_Motor which_motors)
+
+

Validate if the motor has reached its set target tachometer position

+
Parameters
+ + +
which_motorsProvide which motor(s) to operate on
+
+
+
Returns
0 when motor(s) has completed a encoder based move properly, If the return value is non-zero, either motor has not finished yet or has encountered an error condition.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorIsTimeDone (SH_Motor which_motors)
+
+

Validate if the motor has finished running for the set time duration

+
Parameters
+ + +
which_motorsProvide which motor(s) to operate on
+
+
+
Returns
0 when motor(s) has completed a timed move properly, If the return value is non-zero, either motor has not finished yet or has encountered an error condition.
+ +
+
+ +
+
+ + + + + + + +
bool EVShieldBank::motorReset ()
+
+

Reset all the set values for the motors Applies to all motors on this bank.

+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldBank::motorResetEncoder (SH_Motor which_motor)
+
+

Reset the current encoder position to zero for the motor

+
Parameters
+ + +
which_motorProvide which motor to operate on
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t EVShieldBank::motorRunDegrees (SH_Motor which_motors,
SH_Direction direction,
int speed,
long degrees,
SH_Completion_Wait wait_for_completion,
SH_Next_Action next_action 
)
+
+

Run the motor for a set number of degrees and proceed to the next action

+
Parameters
+ + + + + + + +
which_motorsspecifiy the motor(s) to operate on
directionspecifiy the direction to run the motor
speedthe speed value (between 0 and 100)
degreesThe degrees the motor should turn through
wait_for_completionwhether this API should wait for competion or not
next_actionfor these motor being operated on
+
+
+
Returns
0 if the operation was finished satisfactorily, in case return value is non-zero you should check for the bits for error conditions.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t EVShieldBank::motorRunRotations (SH_Motor which_motors,
SH_Direction direction,
int speed,
long rotations,
SH_Completion_Wait wait_for_completion,
SH_Next_Action next_action 
)
+
+

Run the motor for a set number of complete rotations and proceed to the next action

+
Parameters
+ + + + + + + +
which_motorsspecifiy the motor(s) to operate on
directionspecifiy the direction to run the motor
speedthe speed value (between 0 and 100)
rotationsThe rotations the motor should rotate through
wait_for_completionwhether this API should wait for competion or not
next_actionfor these motor being operated on
+
+
+
Returns
0 if the operation was finished satisfactorily, in case return value is non-zero you should check for the bits for error conditions.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t EVShieldBank::motorRunSeconds (SH_Motor which_motors,
SH_Direction direction,
int speed,
uint8_t duration,
SH_Completion_Wait wait_for_completion,
SH_Next_Action next_action 
)
+
+

Run the motor for a set duration at a set speed and do the next action

+
Parameters
+ + + + + + + +
which_motorsspecifiy the motor(s) to operate on
directionspecifiy the direction to run the motor
speedthe speed value (between 0 and 100)
durationin seconds
wait_for_completionwhether this API should wait for competion or not
next_actionfor these motor being operated on
+
+
+
Returns
0 if the operation was finished satisfactorily, in case return value is non-zero you should check for the bits for error conditions.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t EVShieldBank::motorRunTachometer (SH_Motor which_motors,
SH_Direction direction,
int speed,
long tachometer,
SH_Move relative,
SH_Completion_Wait wait_for_completion,
SH_Next_Action next_action 
)
+
+

run until the tachometer target has been reached and do next action

+
Parameters
+ + + + + + + + +
which_motorsspecifiy the motor(s) to operate on
directionspecifiy the direction to run the motor
speedthe speed value (between 0 and 100)
tachometerthe target for the encoder value to achieve.
relativeis the tachometer relative or absolute.
wait_for_completionwhether this API should wait for competion or not
next_actionfor these motor being operated on
+
+
+
Returns
0 if the operation was finished satisfactorily, in case return value is non-zero you should check for the bits for error conditions.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void EVShieldBank::motorRunUnlimited (SH_Motor which_motors,
SH_Direction direction,
int speed 
)
+
+

Run the motor endlessly at the desired speed in the desired direction

+
Parameters
+ + + + +
which_motorsspecifiy the motor(s) to operate on
directionspecifiy the direction to run the motor
speedthe speed value (between 0 and 100)
+
+
+
Returns
Starts the motors and function returns immediately
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetCommandRegA (SH_Motor which_motor,
uint8_t value 
)
+
+

Set the Command Register A There are two command registers, A and B.

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + + +
which_motorProvide which motor to operate on
valueThe command register value to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetCommandRegB (SH_Motor which_motor,
uint8_t value 
)
+
+

Set the Command Register B There are two command registers, A and B.

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + + +
which_motorProvide which motor to operate on
valueThe command register value to set
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetEncoderPID (uint16_t Kp,
uint16_t Ki,
uint16_t Kd 
)
+
+

Set the PID control factors for the encoders All motors on this bank will use the same PID values.

+
Parameters
+ + + + +
KpThe proportionate factor of the PID.
KiThe integreal factor of the PID.
KdThe differential factor of the PID.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetEncoderSpeedTimeAndControl (SH_Motor which_motors,
long encoder,
int speed,
uint8_t duration,
uint8_t control 
)
+
+

This function sets the speed, the number of seconds, and the control (a.k.a. command register A)

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + + + + + +
which_motorsProvide which motor(s) to operate on
encoderTarget encoder position to achieve
speedSpeed value between 0 and 100
durationtime to run in seconds
controlcommand register value
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetEncoderTarget (SH_Motor which_motor,
long target 
)
+
+

Set the target encoder position for the motor

+
Parameters
+ + + +
which_motorProvide which motor to operate on
targetEncode value to achieve
+
+
+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldBank::motorSetPassCount (uint8_t pass_count)
+
+

Set how many times the PID controller is allowed to oscillate at the set point Depending on your situation of load and power characteristics, your PID algorithm may oscillate indefinitly trying to achieve it's target. To prevent that from happening there is a limit set.

+
Parameters
+ + +
pass_countthe maximum number of times the PID is allowed to cross it's target.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetSpeed (SH_Motor which_motor,
int speed 
)
+
+

Set the speed of the motor

+
Parameters
+ + + +
which_motorProvide which motor to operate on
speedThe speed value between 0 and 100
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetSpeedPID (uint16_t Kp,
uint16_t Ki,
uint16_t Kd 
)
+
+

Set the PID control factors for the speed of the motors All motors on this bank will use the same PID values.

+
Parameters
+ + + + +
KpThe proportionate factor of the PID.
KiThe integreal factor of the PID.
KdThe differential factor of the PID.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetSpeedTimeAndControl (SH_Motor which_motors,
int speed,
uint8_t duration,
uint8_t control 
)
+
+

Set the speed, duration to run, and control for the motor through register A (or B)

+
    For more information on what register does, please refer to 'Motor Command Register Explained' section of EVShield-Advanced-Development-Guide.pdf from following url:
+    http://www.openelectrons.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=1
+
Parameters
+ + + + + +
which_motorsProvide which motor(s) to operate on
speedSpeed value between 0 and 100
durationtime to run in seconds
controlcommand register value
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorSetTimeToRun (SH_Motor which_motor,
int seconds 
)
+
+

Set the time in seconds for which the motor should run for

+
Parameters
+ + + +
which_motorProvide which motor to operate on
secondsThe time duration the motor should run
+
+
+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldBank::motorSetTolerance (uint8_t tolerance)
+
+

Set how far away from the set point the PID controller is allowed to oscillate (amplitude) Depending on your situation of load and power characteristics, your PID algorithm may oscillate above or below the target.

+
Parameters
+ + +
tolerancethe maximum amplititude allowed.
+
+
+ +
+
+ +
+
+ + + + + + + +
bool EVShieldBank::motorStartBothInSync ()
+
+

Start both motors at the same time to follow the set conditions This will execute the commands specified in the command register on both motors at once.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::motorStop (SH_Motor which_motors,
SH_Next_Action next_action 
)
+
+

stop the motor and do the next action

+
Parameters
+ + + +
which_motorsspecifiy the motor(s) to operate on
next_actionfor these motor being operated on
+
+
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorWaitUntilTachoDone (SH_Motor which_motors)
+
+

Wait until the motor has reached its set target tachometer position

+
Parameters
+ + +
which_motorsProvide which motor(s) to operate on
+
+
+
Returns
function waits until when motor(s) has stopped, returns 0 if the set goal was achieved. If the return value is non-zero, you should check for error condition such as stall.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldBank::motorWaitUntilTimeDone (SH_Motor which_motors)
+
+

Wait until the motor has finished running for its set respective time duration

+
Parameters
+ + +
which_motorsProvide which motor(s) to operate on
+
+
+
Returns
function waits until when motor(s) has stopped, returns 0 if the set goal was achieved. If the return value is non-zero, you should check for error condition such as stall.
+ +
+
+ +
+
+ + + + + + + +
int EVShieldBank::nxshieldGetBatteryVoltage ()
+
+

nxshieldGetBatteryVoltage() is provided for backword compatibility with nxshield programs.

+ +
+
+ +
+
+ + + + + + + + +
int EVShieldBank::sensorReadRaw (uint8_t which_sensor)
+
+

Read the raw analog value from the sensor and return as an int

+
Parameters
+ + +
which_sensorthe sensor to read the raw value from
+
+
+
Returns
raw value from the sensor
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBank::sensorSetType (uint8_t which_sensor,
uint8_t sensor_type 
)
+
+

Set the sensor type of the sensor on this bank

+
Parameters
+ + + +
which_sensorthe sensor to set the type to.
sensor_typetype value of the sensor, refer to Advanced User Guide for available values of sensor types.
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield_bank.js b/html/class_e_v_shield_bank.js new file mode 100644 index 0000000..40517d2 --- /dev/null +++ b/html/class_e_v_shield_bank.js @@ -0,0 +1,43 @@ +var class_e_v_shield_bank = +[ + [ "EVShieldBank", "class_e_v_shield_bank.html#a8aa01e9660dedbce70fb3cc6342d0468", null ], + [ "centerLedSetRGB", "class_e_v_shield_bank.html#aacdb13981e1122c027b2af4999db2dfe", null ], + [ "evshieldGetBatteryVoltage", "class_e_v_shield_bank.html#ad73253245aaae122df3a2254c4ca2069", null ], + [ "EVShieldIssueCommand", "class_e_v_shield_bank.html#a4c2937b6d663b0eb723b456af6d80915", null ], + [ "ledSetRGB", "class_e_v_shield_bank.html#a3c0ad0e6f73ecab4702caf415dbcbbe6", null ], + [ "motorGetCommandRegA", "class_e_v_shield_bank.html#a0da5b007e5275d4cb187bd858c2cce2e", null ], + [ "motorGetCommandRegB", "class_e_v_shield_bank.html#a010f263442619b3c331482f69005b040", null ], + [ "motorGetEncoderPosition", "class_e_v_shield_bank.html#a6dd3b31c3b684cd0166b92e67538c2d2", null ], + [ "motorGetEncoderTarget", "class_e_v_shield_bank.html#a2d99d0a6ed741e995816b4a8d9d39e6e", null ], + [ "motorGetSpeed", "class_e_v_shield_bank.html#adc2d58eccbd294e57e9c16f728452ebe", null ], + [ "motorGetStatusByte", "class_e_v_shield_bank.html#a30e7d064c3154af030f7d1da93002ab7", null ], + [ "motorGetTasksRunningByte", "class_e_v_shield_bank.html#aea3b35857167ea218276cbe89654b9e1", null ], + [ "motorGetTimeToRun", "class_e_v_shield_bank.html#ac19b519f36f97b2d8702ffc4d91b799c", null ], + [ "motorIsTachoDone", "class_e_v_shield_bank.html#a91fbbcca552174773221b412ddfef988", null ], + [ "motorIsTimeDone", "class_e_v_shield_bank.html#ae12f047f1858e7105e989f0483789918", null ], + [ "motorReset", "class_e_v_shield_bank.html#ada415faec723cdf5de6e073f0741edb1", null ], + [ "motorResetEncoder", "class_e_v_shield_bank.html#a3c645c621fc0759f2f52b1b600e19722", null ], + [ "motorRunDegrees", "class_e_v_shield_bank.html#a03f4dd129cd839d388900c19fd17a3d7", null ], + [ "motorRunRotations", "class_e_v_shield_bank.html#a7547dd2037adc54f865fb3fccc2ad5a9", null ], + [ "motorRunSeconds", "class_e_v_shield_bank.html#a1b2b129be552e445d6f33f944d406709", null ], + [ "motorRunTachometer", "class_e_v_shield_bank.html#a24a5885175ca344aff6155dab336f119", null ], + [ "motorRunUnlimited", "class_e_v_shield_bank.html#a788f33ef3bee5b8cea87c6a4e68a449a", null ], + [ "motorSetCommandRegA", "class_e_v_shield_bank.html#af1443ed054d090d31975986985602685", null ], + [ "motorSetCommandRegB", "class_e_v_shield_bank.html#a29ef890dae85f0a9e2b8685ca3580445", null ], + [ "motorSetEncoderPID", "class_e_v_shield_bank.html#add3b77cf69ff1113a7181b5e9c42cd81", null ], + [ "motorSetEncoderSpeedTimeAndControl", "class_e_v_shield_bank.html#a3e44d81d121f57751e4674da29f159cc", null ], + [ "motorSetEncoderTarget", "class_e_v_shield_bank.html#a7fc5f0a0fcccfd37e0b35dca2e328c80", null ], + [ "motorSetPassCount", "class_e_v_shield_bank.html#a92bb3ef8f196a5d9d1bbc721b0c0d23d", null ], + [ "motorSetSpeed", "class_e_v_shield_bank.html#a4bd17ee3c6a3a3aadd18147129782d55", null ], + [ "motorSetSpeedPID", "class_e_v_shield_bank.html#aa1bf2d477ffa7d281872145f95141517", null ], + [ "motorSetSpeedTimeAndControl", "class_e_v_shield_bank.html#a6908e4422c39450d317a3599b4371f43", null ], + [ "motorSetTimeToRun", "class_e_v_shield_bank.html#ab150f72a6683bc5e6e7fa81eb1c35f09", null ], + [ "motorSetTolerance", "class_e_v_shield_bank.html#a13ae8750898ee5963774ae5e4fb210d7", null ], + [ "motorStartBothInSync", "class_e_v_shield_bank.html#a630d090801e17365d4f9e00454c2b12c", null ], + [ "motorStop", "class_e_v_shield_bank.html#a4313762ae3dcde3493a58407ec6bb274", null ], + [ "motorWaitUntilTachoDone", "class_e_v_shield_bank.html#ab221823a79db261db36092b46f725ec1", null ], + [ "motorWaitUntilTimeDone", "class_e_v_shield_bank.html#ab5fce2da02e6961e4508274fd9d0b364", null ], + [ "nxshieldGetBatteryVoltage", "class_e_v_shield_bank.html#ae847eadc336ddb1ae208038564d65064", null ], + [ "sensorReadRaw", "class_e_v_shield_bank.html#a9fdd3d2e027c849dd6b8e11fb28f9468", null ], + [ "sensorSetType", "class_e_v_shield_bank.html#a8dd8cae52e729b3941dbb438753b74cb", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_bank.png b/html/class_e_v_shield_bank.png new file mode 100644 index 0000000000000000000000000000000000000000..e22487e57f5f55e52799de0c54025b7a1a5ec3af GIT binary patch literal 1292 zcmeAS@N?(olHy`uVBq!ia0vp^mw@;H2Q!d#i#+=PNJ#|vgt-3y{~ySF@#br3|Dg#$ z78oBmaDcV*jy#adQ4-`A%m7pb0#{Fk7%?!g%=UC~45?szJNMzF#R>v!*7BkI{wv1| zv9g)G+chWc)T}9cHIyzKIP*_+>6CMApS(4fZdUZXv@=50(`tIaq$Q7ACaLfiq%S@G zTHRB6&#TY3m)>lDcH6cl=+&~_5w9#kt-e;4pd~jU(I{D>2 zo-iNZkK#*HTR+8Lt~Fcv_v*J&yRFTaD*RWP)c&o!JfCNEidwi`mAP4+_R_SqXIyq~ z)egOuy7*Ch^Yz^GRU68W)@(N1dFj-<8)-UUWv>f=@?M(9Xt%umDqlWN+LT`>O&@Nk z{?PT~QRMzx0jJ*H4$YgEq5n8{t(SGgy%krVym?UV<=ekn;nqFX-P2Z2vtQo6w>NL< zuamiIhwmQ?`n=Ir&Wu;CXX$;7t;=60>%9FRAGOJE`o}k~zx@x=4A=a;yeIsh{>&vi zdt%vMikmP@z7BVI3%n*d91dQkm-wG(r$)|C9hG ziABLxd+N^@)kS4ZyB%dB>b?5Y-X+g|Z3_xc+x}=rp5^{imv(MlQe_#KrT$azblTP2 z>U$x#b@QitZ9W-eV!bKmt>V-rqJBvy&t0(l?)5FF>i*K}o}0J2Em09z98&HzDQb`A z%`XA2cGo?F+ND)@e~|Bs?p>-DSarI>a+;4y>BcQnKb{Kb`>*eL>A%_(hBgjhy75AC zoD#^%2TX+z?Al@9ppJ#U$UEN*eakl%5b1?904Ul^!$x0LCgFAA=$t zN&3LnB~vaLE}If$#d4rk1(ZLTB$TG8ywq68VsK>9mx}-Mp8nZ#MQ8ig46SMYDmSxV z9^CVLT9Ea^r^_tXEz6nhVH6%a<pC~J z_J!G|u)Vpl8cz@BKR#~r-K$n-YudUb&GnzM7Nt(}oqJYg?WD!c)2IFlzWThiw|P3Z zKKuLNQ@;v6Y)e{M`CbE(9?n(#oE#o#rmnt!{c&JQbwy4LP{+D>Y0l+6Ape7%aa!=s Ua0&YkV9~|k>FVdQ&MBb@02n`E-2eap literal 0 HcmV?d00001 diff --git a/html/class_e_v_shield_bank_b-members.html b/html/class_e_v_shield_bank_b-members.html new file mode 100644 index 0000000..974e1f7 --- /dev/null +++ b/html/class_e_v_shield_bank_b-members.html @@ -0,0 +1,206 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldBankB Member List
+
+
+ +

This is the complete list of members for EVShieldBankB, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
centerLedSetRGB(uint8_t R, uint8_t G, uint8_t B) (defined in EVShieldBank)EVShieldBank
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVShieldBank(uint8_t i2c_address=SH_Bank_A)EVShieldBank
EVShieldBankB(uint8_t i2c_address_b=SH_Bank_B)EVShieldBankB
evshieldGetBatteryVoltage()EVShieldBank
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
EVShieldIssueCommand(char command)EVShieldBank
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
ledSetRGB(uint8_t R, uint8_t G, uint8_t B) (defined in EVShieldBank)EVShieldBank
m_protocolEVShieldI2C
motorGetCommandRegA(SH_Motor which_motor)EVShieldBank
motorGetCommandRegB(SH_Motor which_motor)EVShieldBank
motorGetEncoderPosition(SH_Motor which_motor)EVShieldBank
motorGetEncoderTarget(SH_Motor which_motor)EVShieldBank
motorGetSpeed(SH_Motor which_motor)EVShieldBank
motorGetStatusByte(SH_Motor which_motor)EVShieldBank
motorGetTasksRunningByte(SH_Motor which_motor)EVShieldBank
motorGetTimeToRun(SH_Motor which_motor)EVShieldBank
motorIsTachoDone(SH_Motor which_motors)EVShieldBank
motorIsTimeDone(SH_Motor which_motors)EVShieldBank
motorReset()EVShieldBank
motorResetEncoder(SH_Motor which_motor)EVShieldBank
motorRunDegrees(SH_Motor which_motors, SH_Direction direction, int speed, long degrees, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunRotations(SH_Motor which_motors, SH_Direction direction, int speed, long rotations, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunSeconds(SH_Motor which_motors, SH_Direction direction, int speed, uint8_t duration, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunTachometer(SH_Motor which_motors, SH_Direction direction, int speed, long tachometer, SH_Move relative, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)EVShieldBank
motorRunUnlimited(SH_Motor which_motors, SH_Direction direction, int speed)EVShieldBank
motorSetCommandRegA(SH_Motor which_motor, uint8_t value)EVShieldBank
motorSetCommandRegB(SH_Motor which_motor, uint8_t value)EVShieldBank
motorSetEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVShieldBank
motorSetEncoderSpeedTimeAndControl(SH_Motor which_motors, long encoder, int speed, uint8_t duration, uint8_t control)EVShieldBank
motorSetEncoderTarget(SH_Motor which_motor, long target)EVShieldBank
motorSetPassCount(uint8_t pass_count)EVShieldBank
motorSetSpeed(SH_Motor which_motor, int speed)EVShieldBank
motorSetSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVShieldBank
motorSetSpeedTimeAndControl(SH_Motor which_motors, int speed, uint8_t duration, uint8_t control)EVShieldBank
motorSetTimeToRun(SH_Motor which_motor, int seconds)EVShieldBank
motorSetTolerance(uint8_t tolerance)EVShieldBank
motorStartBothInSync()EVShieldBank
motorStop(SH_Motor which_motors, SH_Next_Action next_action)EVShieldBank
motorWaitUntilTachoDone(SH_Motor which_motors)EVShieldBank
motorWaitUntilTimeDone(SH_Motor which_motors)EVShieldBank
mp_shieldEVShieldI2C
nxshieldGetBatteryVoltage()EVShieldBank
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
sensorReadRaw(uint8_t which_sensor)EVShieldBankB
sensorSetType(uint8_t which_sensor, uint8_t sensor_type)EVShieldBankB
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_v_shield_bank_b.html b/html/class_e_v_shield_bank_b.html new file mode 100644 index 0000000..6db0475 --- /dev/null +++ b/html/class_e_v_shield_bank_b.html @@ -0,0 +1,466 @@ + + + + + + +EVShield: EVShieldBankB Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShieldBankB Class Reference
+
+
+ +

EVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods for the EVShield Bank B. + More...

+ +

#include <EVShield.h>

+
+Inheritance diagram for EVShieldBankB:
+
+
+ + +EVShieldBank +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVShieldBankB (uint8_t i2c_address_b=SH_Bank_B)
 
int sensorReadRaw (uint8_t which_sensor)
 
bool sensorSetType (uint8_t which_sensor, uint8_t sensor_type)
 
- Public Member Functions inherited from EVShieldBank
 EVShieldBank (uint8_t i2c_address=SH_Bank_A)
 
int evshieldGetBatteryVoltage ()
 
int nxshieldGetBatteryVoltage ()
 
uint8_t EVShieldIssueCommand (char command)
 
bool motorSetEncoderTarget (SH_Motor which_motor, long target)
 
long motorGetEncoderTarget (SH_Motor which_motor)
 
bool motorSetSpeed (SH_Motor which_motor, int speed)
 
int8_t motorGetSpeed (SH_Motor which_motor)
 
bool motorSetTimeToRun (SH_Motor which_motor, int seconds)
 
uint8_t motorGetTimeToRun (SH_Motor which_motor)
 
bool motorSetCommandRegB (SH_Motor which_motor, uint8_t value)
 
uint8_t motorGetCommandRegB (SH_Motor which_motor)
 
bool motorSetCommandRegA (SH_Motor which_motor, uint8_t value)
 
uint8_t motorGetCommandRegA (SH_Motor which_motor)
 
int32_t motorGetEncoderPosition (SH_Motor which_motor)
 
uint8_t motorGetStatusByte (SH_Motor which_motor)
 
uint8_t motorGetTasksRunningByte (SH_Motor which_motor)
 
bool motorSetEncoderPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
bool motorSetSpeedPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
+bool centerLedSetRGB (uint8_t R, uint8_t G, uint8_t B)
 
+bool ledSetRGB (uint8_t R, uint8_t G, uint8_t B)
 
bool motorSetPassCount (uint8_t pass_count)
 
bool motorSetTolerance (uint8_t tolerance)
 
bool motorReset ()
 
bool motorStartBothInSync ()
 
bool motorResetEncoder (SH_Motor which_motor)
 
bool motorSetSpeedTimeAndControl (SH_Motor which_motors, int speed, uint8_t duration, uint8_t control)
 
bool motorSetEncoderSpeedTimeAndControl (SH_Motor which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
 
uint8_t motorIsTimeDone (SH_Motor which_motors)
 
uint8_t motorWaitUntilTimeDone (SH_Motor which_motors)
 
uint8_t motorIsTachoDone (SH_Motor which_motors)
 
uint8_t motorWaitUntilTachoDone (SH_Motor which_motors)
 
void motorRunUnlimited (SH_Motor which_motors, SH_Direction direction, int speed)
 
uint8_t motorRunSeconds (SH_Motor which_motors, SH_Direction direction, int speed, uint8_t duration, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunTachometer (SH_Motor which_motors, SH_Direction direction, int speed, long tachometer, SH_Move relative, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunDegrees (SH_Motor which_motors, SH_Direction direction, int speed, long degrees, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
uint8_t motorRunRotations (SH_Motor which_motors, SH_Direction direction, int speed, long rotations, SH_Completion_Wait wait_for_completion, SH_Next_Action next_action)
 
bool motorStop (SH_Motor which_motors, SH_Next_Action next_action)
 
bool sensorSetType (uint8_t which_sensor, uint8_t sensor_type)
 
int sensorReadRaw (uint8_t which_sensor)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

EVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods for the EVShield Bank B.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVShieldBankB::EVShieldBankB (uint8_t i2c_address_b = SH_Bank_B)
+
+

constructor for bank be of the EVShield; optional custom i2c address can be supplied

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
int EVShieldBankB::sensorReadRaw (uint8_t which_sensor)
+
+

Read the raw analog value from the sensor and return as an int

+
Parameters
+ + +
which_sensorthe sensor to read the raw value from
+
+
+
Returns
raw value from the sensor
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldBankB::sensorSetType (uint8_t which_sensor,
uint8_t sensor_type 
)
+
+

Set the sensor Type of the sensor on this bank

+
Parameters
+ + + +
which_sensorthe sensor to set the type to.
sensor_typetype value of the sensor, refer to Advanced User Guide for available values of sensor types.
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield_bank_b.js b/html/class_e_v_shield_bank_b.js new file mode 100644 index 0000000..ba361ef --- /dev/null +++ b/html/class_e_v_shield_bank_b.js @@ -0,0 +1,6 @@ +var class_e_v_shield_bank_b = +[ + [ "EVShieldBankB", "class_e_v_shield_bank_b.html#acbbaf78da6ec240b1adc2c19995decd7", null ], + [ "sensorReadRaw", "class_e_v_shield_bank_b.html#aa25cd3da19e88ba8abe63001903353f5", null ], + [ "sensorSetType", "class_e_v_shield_bank_b.html#a40e73844af7c9c35e17999e24d8c959e", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_bank_b.png b/html/class_e_v_shield_bank_b.png new file mode 100644 index 0000000000000000000000000000000000000000..2c09e1a23ca9401da994c79eda20616ffbca2aef GIT binary patch literal 1287 zcmeAS@N?(olHy`uVBq!ia0vp^mw@;H2Q!d#i#+=PNJ#|vgt-3y{~ySF@#br3|Dg#$ z78oBmaDcV*jy#adQ4-`A%m7pb0#{Fk7%?!gO!IVc45?szJNMzF#R>v!xBIp3|DUMe z$;3SC&8|6Vr)EvrtD$t^z?pxlOQ)P``{b>;bhD!8rJWI~o>tQXCM|i~GD(HEAbsh} zpOcr!&infF?X5Sypa06;(=4sEk(28$+pz5XzW3#u*LulEJ#F;a?0;5u<-^{f>&I{H zm0UAp)+2qd*IZBcFZ-Pn^n3N&*ELz}OFybFz4YbhbJu#KHIrt>{Csis#*f@7v$h%u zzrD6DBy#%PE_uGV?Y6fM#)+Ojd+v#s_U`1}8?Thd_@B_9x{I}9zMPr$9^)B-uhg%% z96sJ0ekA<-ud97QdH2^9ZFZS&bno7(EzM7RZ~2_#`{%jxWudUk@7*cai!Oh9{^djF z;^?JyMY~Ua*uL>fO-_HiZ!>%HOLMQcFRP@z=l|DV8@c>+#kbPm^(&{$p7JyJnD+na zK9^#S>ou2fr>kF2*<%X~kZ%8tDxUx0!6M)_sbmf?j2PdooD$@vo(v>jrZDgsF~=NJ zU3}L+bKd%rT`60BYuX;$apC2pi+L+VB>59M0+=lPG#GgVycmvisx~k>aXzpp51IA6 zavvYV@``!V2jn?a8Q!-DHIzGX9@?dTN(+8l23iT-r>p*eD_P}Y9%3N=t5rRPb zrvxxbEDD|#x8HrI&05pfxw^Buwub(U3o5RSUa7e`y711nn7GuJccOy!&e7O9xn^qW z=2zQn^H#l`x7~Z`(G<;DvXSe*P4K$JroJ&HJ!5{gYPH$k_m@5|xf!J#B-9bO%39S^ z_uiD8sufD_U#qM<+&d}uhxzff$ATtn>`mPx|4&zWSugCx;0#PJ zvZ_-U+BksW}OhDiSN68oj?7w^si2gU(=RR8S(8gP%3RPP_s z@Lhj@am>7Hv%YQ<^F8{jQ>A*V>HUzbQ*Xj#wg;Q}s?0n+_tGZE-sGEWcIEahK#)>0StSC)Ud8x6G z#lXc&b1rW~c3MMqq5aazeRD7Wog(K}Uc75zP>K!1f9w&BBOrE6%bc}rGvkg4+{d_8 z8x(;_2V}t!t2jU3(~m#DpS9}K@3ZW$%^7&J`Jdh0KIInYTJxiY-<$8S7=*`8d0WIV z$KO8Z-pp4KW~=jVKR%}QRQzY{^4G4JGw%moiM-aHr<{HD^tIL?yFX@iXNuQfIUbb# zOl#UFt$ekpw3}CM`dreow5o_)X&+h}cf+z`=ZB&X_m-|PXV2H4HtTy|(#n;YNtv@h zeo{ZbD96vQF1}y2VKWE9kuDmHGN5EJV_Bw^bc6i|en!9GH}`Fd+JL1NgQu&X%Q~lo FCIG|FVT}L) literal 0 HcmV?d00001 diff --git a/html/class_e_v_shield_i2_c-members.html b/html/class_e_v_shield_i2_c-members.html new file mode 100644 index 0000000..c343ffa --- /dev/null +++ b/html/class_e_v_shield_i2_c-members.html @@ -0,0 +1,165 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldI2C Member List
+
+
+ +

This is the complete list of members for EVShieldI2C, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_v_shield_i2_c.html b/html/class_e_v_shield_i2_c.html new file mode 100644 index 0000000..cfb9207 --- /dev/null +++ b/html/class_e_v_shield_i2_c.html @@ -0,0 +1,812 @@ + + + + + + +EVShield: EVShieldI2C Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShieldI2C Class Reference
+
+
+ +

This class implements I2C interfaces used by EVShield. + More...

+ +

#include <EVShieldI2C.h>

+
+Inheritance diagram for EVShieldI2C:
+
+
+ + +BaseI2CDevice +SoftI2cMaster +EVs_AbsoluteIMU +EVs_AngleSensor +EVs_CurrentMeter +EVs_DISTNx +EVs_LightSensorArray +EVs_LineLeader +EVs_MagicWand +EVs_NumericPad +EVs_NXTCam +EVs_NXTMMX +EVs_NXTServo +EVs_PFMate +EVs_PiLight +EVs_PSPNx +EVs_RTC +EVs_VoltMeter +EVShieldBank + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + +

+Public Attributes

void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
+ + + + + + + + + +

+Additional Inherited Members

- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class implements I2C interfaces used by EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVShieldI2C::EVShieldI2C (uint8_t i2c_address)
+
+

Class constructor for the EVShieldI2C; derived from both BaseI2CDevice and SoftI2cMaster; i2c address must be passed as a parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
char * EVShieldI2C::getDeviceID ()
+
+

get the name of the device

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVShieldI2C::getErrorCode ()
+
+

get the error code of last i2c operation

+ +
+
+ +
+
+ + + + + + + +
char * EVShieldI2C::getFeatureSet ()
+
+

get the features the device is capable of; only supported by some devices

+ +
+
+ +
+
+ + + + + + + +
char * EVShieldI2C::getFirmwareVersion ()
+
+

get the firmware version of the device

+ +
+
+ +
+
+ + + + + + + +
char * EVShieldI2C::getVendorID ()
+
+

get the name of the vendor of the device

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void EVShieldI2C::init (void * shield,
SH_BankPort bp 
)
+
+

initialized this i2c address with a pointer to the EVShield and the bankport it is connected to

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldI2C::readByte (uint8_t location)
+
+

Read a byte from specified location

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
a byte value read from the location
+ +
+
+ +
+
+ + + + + + + + +
uint16_t EVShieldI2C::readInteger (uint8_t location)
+
+

Read an integer from specified location. Integer comprises of 2 bytes.

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
an integer value read from the location
+ +
+
+ +
+
+ + + + + + + + +
uint32_t EVShieldI2C::readLong (uint8_t location)
+
+

Read a long from specified location. Long comprises of 4 bytes.

+
Parameters
+ + +
locationaddress to read at
+
+
+
Returns
a long value read from the location
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t * EVShieldI2C::readRegisters (uint8_t start_register,
uint8_t bytes,
uint8_t * buf 
)
+
+

read the specified number of bytes from the buffer starting from the specified start register

+
Parameters
+ + + + +
start_registerlocation to start reading from
bytesNumber of bytes to read
bufbuffer to read the data into
+
+
+
Returns
the character array that was read.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
char * EVShieldI2C::readString (uint8_t location,
uint8_t bytes_to_read,
uint8_t * buffer = 0,
uint8_t buffer_length = 0 
)
+
+

Read a string from specified location

+
Parameters
+ + + + + +
locationaddress to read at
bytes_to_readnumber of bytes to read
bufferoptional, a buffer to read the data into.
buffer_lengthoptional, length of the buffer supplied.
+
+
+
Returns
a char array read from the location
+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldI2C::setAddress (uint8_t address)
+
+
set the i2c address for this device 
+
Parameters
+ + +
addressnew device address.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldI2C::writeByte (uint8_t location,
uint8_t data 
)
+
+
write one byte to the specified register location
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldI2C::writeInteger (uint8_t location,
uint16_t data 
)
+
+
write two bytes (int) to the specified register location
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldI2C::writeLong (uint8_t location,
uint32_t data 
)
+
+
write four bytes (long) to the specified register location 
+
Parameters
+ + + +
locationlocation to write to.
datathe data to write.
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool EVShieldI2C::writeRegisters (uint8_t start_register,
uint8_t bytes_to_write,
uint8_t * buffer = 0 
)
+
+
write data bytes to the i2c device starting from the start register
+
Parameters
+ + + + +
start_registerlocation to write at.
bytes_to_writeNumber of bytes to write
buffer(optional) data buffer, if not supplied, data from internal buffer is used.
+
+
+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
uint8_t* EVShieldI2C::_i2c_buffer
+
+

Pointer to internal i2c buffer

+ +
+
+ +
+
+ + + + +
uint8_t EVShieldI2C::m_protocol
+
+

global variable of the i2c protocol used

+ +
+
+ +
+
+ + + + +
void* EVShieldI2C::mp_shield
+
+

Pointer to the EVShield

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield_i2_c.js b/html/class_e_v_shield_i2_c.js new file mode 100644 index 0000000..ca82adf --- /dev/null +++ b/html/class_e_v_shield_i2_c.js @@ -0,0 +1,24 @@ +var class_e_v_shield_i2_c = +[ + [ "EVShieldI2C", "class_e_v_shield_i2_c.html#ad8d334d52c0458db8daa2a55666755e3", null ], + [ "checkAddress", "class_e_v_shield_i2_c.html#a0d9efb4ca44c84c7a978fc3400f26cb5", null ], + [ "getDeviceID", "class_e_v_shield_i2_c.html#a01bb76c25b537fa20e1b665d2abe1fdb", null ], + [ "getErrorCode", "class_e_v_shield_i2_c.html#a0aae44b9edb530685d92f45509f709e6", null ], + [ "getFeatureSet", "class_e_v_shield_i2_c.html#afb45832f3bc65ef6199d26871afbbc87", null ], + [ "getFirmwareVersion", "class_e_v_shield_i2_c.html#ab840df4178c2185e3754c5a63f2eafd9", null ], + [ "getVendorID", "class_e_v_shield_i2_c.html#ae8284ef8911b27a117573be11c9de3ef", null ], + [ "init", "class_e_v_shield_i2_c.html#a4e52d5923c11b593d63a6bbfe7d23632", null ], + [ "readByte", "class_e_v_shield_i2_c.html#aebddba215ad02257256727432f8d6c52", null ], + [ "readInteger", "class_e_v_shield_i2_c.html#ad1def2cb7dea12bb1cf6531d73e6d6a3", null ], + [ "readLong", "class_e_v_shield_i2_c.html#abe642933c2cff670b3761af3e8577db2", null ], + [ "readRegisters", "class_e_v_shield_i2_c.html#a43259908f1a8b39305cfea5022455a90", null ], + [ "readString", "class_e_v_shield_i2_c.html#a8e6812209bba1d40a74b9363f2498ec4", null ], + [ "setAddress", "class_e_v_shield_i2_c.html#a0e782cb7de9a64252dc7b11f17c6519a", null ], + [ "writeByte", "class_e_v_shield_i2_c.html#aacefc55a3fc1cbea07b4f6049ec411d1", null ], + [ "writeInteger", "class_e_v_shield_i2_c.html#a84faede3d1dc4b87a31ed41f56ba8cf7", null ], + [ "writeLong", "class_e_v_shield_i2_c.html#aa5521a3eea046b7c1f6d9e3b7de33470", null ], + [ "writeRegisters", "class_e_v_shield_i2_c.html#addbc8221e77952176e2026318e5c36a4", null ], + [ "_i2c_buffer", "class_e_v_shield_i2_c.html#a8c584a33eda45ae2b6c44e367040584b", null ], + [ "m_protocol", "class_e_v_shield_i2_c.html#a00cbb323f81b9756c278ea734604e233", null ], + [ "mp_shield", "class_e_v_shield_i2_c.html#a623b1fa3636c5f6630f82ca1091f6ae9", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_i2_c.png b/html/class_e_v_shield_i2_c.png new file mode 100644 index 0000000000000000000000000000000000000000..6cfff8e62f4930f5968436133ec6d61416525caa GIT binary patch literal 7237 zcmdT}4O~)pzsKu*+}6swr`s$o>1F7aroGJ6ELg8DP3=V_3&pmjl_ll-3omW1T62rS zsVh@jwlr8!SrVY2xl|&hW#kkQ&4U(%%wq>S$jfsmyRN&>^W3}V-urwSpAY;v9M0jx z@BcgBw{vu3RM_MEp2P?Ohxv}Q93<&=g(z4rR+&d4V|`Da3rGJWHQn6-Ah9eMlk zF_g);aU6N~?Ag%J;BvGFjcmT2u{mlB3i*=bp|};Z7=`k@w|>pam>eg)N}2XxtA|T} z#{ADsbl~#a%RXPoog2$(F7&?Wd_!-(3JZ2lKit235$^Dg>FrY+lpZniyQhedUokOo zn-pI;UNo&Zu@~FTybM>LCwklmR;tekbzy+Wt{iF{>Nm@~Eou|}rkjoZ9$X~ZXCAuf zpPwbrnygX0jNdzcBfX)>tr1~{q09zoxLwcq8TJB_Ty zKv>IKBzcrKl5NWc+uq!^aya%LWzRlq-xt~eTJY8^*_cf(teBqdWmz)F5yy|%+x*n_ z^b$E#2#k526B>??SlO%}T#T<}ChZ#K(gsQ2khx7Je1uH{Q^b^1OY4p)R(rJX}HjC&=>dA3py;#nD|;>2)K zCt3@ujo+<>4j8=EQH-WIuKB7xv4p;l%lhe2;%Flgd#R)6J3dEx70WYMqiNJ(TLn)- zUJ-D=l4kQgPjAi)?xlUE?MMUIKhu`W@Xjx{d19-(OnPL;^r#Nl?td^n!zp-2vQ>n# zU12)ED;e(+x;Bb@n!?(^+KK-!1X}rLy;( zccJ9-r+#>q>Ac1_FN-D@vwHH$3jI2{fAoLHFaR2PRK0P=iK2En z<8*F*$cI;CKMbN8!>1g7yrpgsB?zDL@7zAr&q%ol{NES79%x$l*3cV$d+S-hy9})# zgACn3dZ^ch)KJQf%+#8oSsO%*Ub9FlIbjXX3Y{ylvYGVNG}VlwOV=%dbMnl&qP(83 z(M2#(O8-dgF8i}7C9gQOt zBz??k-#2t8X+tp)lCS}-IfQF1aABJ}CuaLMxMKY)xMTX^j@S0r_C`&)gF1$E`;SiK zKYswf$gOE1GRid&Elp7qlcv~(A$$}2ycqMPI4(o3&p9X5H(r1QBPurTv3n7@)|7{q zlbbRPjN1`No1KC_4+7VhPf@`jFZ zS-OaOP)!XbQY@M$D!UBT9qp~BJ@t$bd&zunw9U%>NNnyUP6?VcMtWC5^e^R~7wRf3 z!^#7EN-17!HWOzJt2^*qE=we+FVncS@*QWAU@-Qik^o=mp?{BebH)b=LG}5jLzk8j z(i9TycoW^J5()e=_zcF_*SEb4xOO zC79n~F=~h8li|)uzJLb#p_AgBWJ9b9N|EC2W#L?Z`2js{TN&GM;iYvLUzJyPIhfIm zaR|~4>2Ho4QXb-GFQ*k~2g0$HskPa_64M^L@slpRwU%j+`urkI%bqtVZ@fjNv~WNK zt0gVvQEjG=SBt5RL&OdYYT-~;vfeS;VynGkK@lF?_GMG!m081_%V0ne38AX(Tde2v z!OF%fcJt}pyN$^AEwuII{pb_)1;5g$wh=#;YH7jFyaO|5i{iwT55jHEX^M|9gcYg8 zu>k4NNgAZXv z#02U%z(?|xWx)Kj=UAB5oEw@D#f$pdu*J$X1dPQ4o+Zv;n5j=_V!|z^QfoMPp#PZ8 z)<56AoO(!1d$+j&PG2nK_EN`CUlSrbqa=yBG7Ijh3K%^u*nV%Gk#bXie}e(O1EmW- z%@3%WQ!CW++mYG-d1hB??OCP!(!08HX!aPyp}-d0Oh3k_WLdt=T)+L7j^ihrZ=3H8 znobv4(geib?ziFo#I98D2I#t)r*4z#Pm$bUlIRxyD+UTr71L+{eL{) zJZ+bCXGmM2-Y>2kAt-Sj-1`&{uz9s`65gr|7jIYTG~)Pg+2ma?6+=+*>z&zjrPegD zRO58<3a{Ad->g_KON<-QPr^u+*f46Qe05S7wnCk7d6}@jZsxw!a$%l>QnTw18e-u^a8pFZ?eDl?u3@R%?Ju%@ zGkD^?Rh7Cdx)c{i6A=B$koMDen+sHD!_4kzEfFjx(j!E5(Oe)#Obr&k^ z4@3L^;(%_YLjoh7q$>|6(8kT5pag^&#uNa$vt=l2`Q}dfqZ~Rd^FazZJhP*zNK!$m zsh=k)$DZ{KY1pJb99SB2B`&AO^d(BhJQj_l!*u8jAwI@FMo3eiMHRa51@eb+- ztPo2^Mu~x-n+GcQb~;Qbhb$VXjK zCgmU3jnq&kWfVKhMwNK%0&o`WtkXZCt?G^A3dt3knkT83{HWrEi~Wm|M7PMLe&mPq z3DmH#<7^&24WYDd`kJx5t2p9VDW0SsDc@*a`7#_JTgHf1hZk@(A~fVf=V12#gY5jf zQnoh=`&QHb3RL_3F)3dDGM09ez3tbrSpL8XL{wrqT$W76S3^(NX6D-VfK}J$^#uVU zQf<8uV3#E^dF3be{_tc`c|}l%>x0_Uk|-ic3XgGy2*_p)wzInKTayD^{hM7^$p zl0W<zA=<2Y3BT ziZRO}m`5FgIhvbSG9loe2?rbW^u>C#Cs&n^fV@iOI!F^PUWc76skr{8fqRm)k$R0u zzL(SiJ+Kn*Go+;{sVOx0y=t!*@Ce{3JY=cO55v}LQU)n02_WRBUZ8P#lG?6jd<(Og z_FcttSx)HI!BJO^#TaOQ!OzsYD_~;}tpYu{gbU)fY6>5gP>9A*aE2H_l_gYYmi$7y z^tc74bmjDS4w_fK2NweD%i&z}^#gi3e;1w}^XFn{jOhhIhp@`Cnq@e?%q3eiMmp;+ zXYv}oPLQH0*6)PYnWXEfu_6v928{<@cHI}g9VHV2DBR;@fV1hcw?v=H;Nl45`*TYS zC14Vke58E~X!t3DCOK;=(9o<=1J=R%UTZR8TzXaxOZh{_QAqen>0THxE^D-FcXFLY z_Y+j5jrN7T2=Nv3be)U~O1b6;;&9-+aI8vj<6=M~`&(V}za>hy6iq4unR zr$AHEMj=72OtN9huk8ujo=tY>O0VO%oC^T&HrTZrx79d6@xTpab|j6qnK#q{?5=Qb zUgvcq%Rg3uWBf3~yEgAm$hVRW} zVBiXiUX8s7gaN*Nt^hwGwW_&|QWL}Qg;Ps-Qnw_ygd&)Mu{Ytds}Ty-XT?3}aMxzw zVpthbpiGmNo5GeO*@CAZL&`5$3zZ3P8FH%D+9tz!ec6{#d(BcmR+o5&Uj)mYW($gX zM?ror0lb!St?oyzYA5}<209khj6658nbx}crhE@h?en>+t z>jWu#UH`NPYsB#y7J(Q|#Ld#l@Mr?)0~8Lw4No)25@43Yum;soGS31Hpaqft9{&+E zc%;Z?Kk-bRpVIPGMQQ|!(+(2MkLI)9fqemfNJ3g7Wa;-KZA3I=j%u3O{MmP{q{RUO zEeY!G_7`YVzDcn+K(%#v5*J|8d;8lqQi;EVbpBQ>=0LisM#55*x~0rYq=(1Hx^p&X%GKB!l)!-_4Au|?koJ%%I;)=vnUn|S|c{XE?Hv!p*z&=mn84{gJhTI77)m9S5zOBz{el1qc zY6DLW_b0|pwm_=)LoVfs*Kki&1MFx-Y!|A(W~;|jrkBertMd?|2%-|vEak{Y@wh7Y zDh@ZF9e_kkkyHDeU}H-j0Xl?uo!v$exBtLSG}FHKvr-}?4h3^tzn$54&9)2asv#*? z>QwP0nPW*e92R-{*%{+9nxwC&D{$#cw)W2_m5k1T(G8`<%#P)<w(*Wdx=eqhz+qw>z zQbgWp+}u%y4&xZc3QAz`J;uI{(Pl{~4l(bglnRY!k7O=k1s5m_p$45TtqBFY@?kJu zy-ZQizJA;cR_B8kyR!iuPeE{GQ>OHMoQ#lc-Ji>Cp}9_KINzBBU-{Tj1?Q+DvrhpX ze9e>c+_6B6{TMMYPKrl=z_pU!`BBUGO#(L|f{}C_38$+Z;dJ@TGfp${|0>z*(AQ)i zM`9C=BsNxno%~;8Gtzi0rE2fVDs3D5NxuNePw4BAap~On;^qU_e-lB@v>&Gs`^xec z1{imC(T9JOR=J<=lxzurSA##3dv42jlD$@O+|Rp9;)gIKIS9Q;LK~!}8j3H^e2!_5 zcmh%tcp)ZmB6f~k`Ykc=myKzPMAieu_(7P2G(`+yg!J5S c*j!hjKQsw%maRkX`JvXYjatK9mH7GJ08Aq;$^ZZW literal 0 HcmV?d00001 diff --git a/html/class_e_v_shield_u_a_r_t-members.html b/html/class_e_v_shield_u_a_r_t-members.html new file mode 100644 index 0000000..7dc858f --- /dev/null +++ b/html/class_e_v_shield_u_a_r_t-members.html @@ -0,0 +1,140 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShieldUART Member List
+
+
+ +

This is the complete list of members for EVShieldUART, including all inherited members.

+ + + + + + + + + + + + + + + +
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getMode()EVShieldUART
init(EVShield *shield, SH_BankPort bp)EVShieldUART
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readValue()EVShieldUART
setMode(char newMode)EVShieldUART
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_v_shield_u_a_r_t.html b/html/class_e_v_shield_u_a_r_t.html new file mode 100644 index 0000000..5f495f9 --- /dev/null +++ b/html/class_e_v_shield_u_a_r_t.html @@ -0,0 +1,453 @@ + + + + + + +EVShield: EVShieldUART Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVShieldUART Class Reference
+
+
+ +

EVShield UART Sensor class. also provides support for the EV3 Touch Sensor. + More...

+ +

#include <EVShieldUART.h>

+
+Inheritance diagram for EVShieldUART:
+
+
+ + +EVs_EV3Color +EVs_EV3Gyro +EVs_EV3Infrared +EVs_EV3Touch +EVs_EV3Ultrasonic + +
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + +

+Public Attributes

EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
EVShieldUART::EVShieldUART ()
+
+

null constructor for the EVShieldUART class; need to init later

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
EVShieldUART::EVShieldUART (EVShieldshield,
SH_BankPort bp 
)
+
+

class constructor with pointer to EVShield and the bankport as a parameter; init is not needed

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
uint8_t EVShieldUART::getMode ()
+
+

get the mode of the sensor

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldUART::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the analog device with a pointed to the EVShield and the bank port it is connected to

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldUART::readAndPrint (uint8_t loc,
uint8_t len 
)
+
+

internal function to examine the buffer

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldUART::readLocationByte (uint8_t loc)
+
+

read the value from the device at given location and return as an integer

+ +
+
+ +
+
+ + + + + + + + +
int16_t EVShieldUART::readLocationInt (uint8_t loc)
+
+

read integer value from specificed location

+ +
+
+ +
+
+ + + + + + + +
uint16_t EVShieldUART::readValue ()
+
+

read sensor reading

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVShieldUART::setMode (char newMode)
+
+

set mode of the sensor

+ +
+
+ +
+
+ + + + + + + + +
bool EVShieldUART::setType (uint8_t type)
+
+

set the type of the device on this port of the EVShield

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVShieldUART::writeLocation (uint8_t loc,
uint8_t data 
)
+
+

write a byte at the given location (selects appropriate bank)

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
SH_BankPort EVShieldUART::m_bp
+
+

bank port the analog device is connected to

+ +
+
+ +
+
+ + + + +
int EVShieldUART::m_offset
+
+

the data for uart sensors is stored in the bank, and there is a offset based on port

+ +
+
+ +
+
+ + + + +
EVShield* EVShieldUART::mp_shield
+
+

pointer to the EVShield class instantiation used

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_v_shield_u_a_r_t.js b/html/class_e_v_shield_u_a_r_t.js new file mode 100644 index 0000000..74959fc --- /dev/null +++ b/html/class_e_v_shield_u_a_r_t.js @@ -0,0 +1,17 @@ +var class_e_v_shield_u_a_r_t = +[ + [ "EVShieldUART", "class_e_v_shield_u_a_r_t.html#a7551e48fdbc3841dcf598c253536a08b", null ], + [ "EVShieldUART", "class_e_v_shield_u_a_r_t.html#a8d8efc8913249d1a303de0cec4b91c7d", null ], + [ "getMode", "class_e_v_shield_u_a_r_t.html#ad920acef2b5f055f4f9e922751e1d0e2", null ], + [ "init", "class_e_v_shield_u_a_r_t.html#a7caccfe2039b89380d4d3cf757d9154d", null ], + [ "readAndPrint", "class_e_v_shield_u_a_r_t.html#a355619f5798843e44098550f934578ff", null ], + [ "readLocationByte", "class_e_v_shield_u_a_r_t.html#ac0725f6870674b48811e35d20e77089d", null ], + [ "readLocationInt", "class_e_v_shield_u_a_r_t.html#aa105d58f7ba7b3e8f2aa0a145734e2d0", null ], + [ "readValue", "class_e_v_shield_u_a_r_t.html#acda9ed68fe1385ad8f9252b0264d0fae", null ], + [ "setMode", "class_e_v_shield_u_a_r_t.html#af672376bf0640f97a169fb6c09fe0d78", null ], + [ "setType", "class_e_v_shield_u_a_r_t.html#a6473238c0500a7309ad3d045f46aff07", null ], + [ "writeLocation", "class_e_v_shield_u_a_r_t.html#a15868e0b224a98d170b9c92159fc79d0", null ], + [ "m_bp", "class_e_v_shield_u_a_r_t.html#af94cc315f6c521c4b72d07c45dfad62d", null ], + [ "m_offset", "class_e_v_shield_u_a_r_t.html#a351e6122c46b516414e626105f1896f1", null ], + [ "mp_shield", "class_e_v_shield_u_a_r_t.html#a1592051574b8eab81cd47fc6b3199846", null ] +]; \ No newline at end of file diff --git a/html/class_e_v_shield_u_a_r_t.png b/html/class_e_v_shield_u_a_r_t.png new file mode 100644 index 0000000000000000000000000000000000000000..d8c409cf9e4b6fc28d7af560c18de01ce6e95bec GIT binary patch literal 1283 zcmeAS@N?(olHy`uVBq!ia0y~yVCn+012~w0!|zraXrQm>U=kHg_=yMz}I0i!$;YIG+F{9Sp(* z4=}KR1RM-hmD|2&@BQ}v{?E@GP@*pvEmLEzFOcIlI>KUGAsSB#;^QzFOzl&gI|UI6rrG<*Ic+T@1M*p*8zI_06cW zTQ#Hf=#t!ZOw4mObTKU3sJ(9X+h4g#4|JkDk4`=Ya!1U?C69iozi&PMeiHY}*Ec%qOIjooMHzcQ_SrXs$b&#{ zG7EqOFqmfyc$|3{*bXrK>E%4YAkkp4MyY|ZBX!mrAjNT1i%Fs(B2MiVNPj2DsD}|Q zIE}(?0Z^19b=I$N#g#m_hXvykQUci!v?_k+R= ztL=|k#Kjt~v78t5aiYkikmbvgu3vZ?oFBe%J)1b=tk5_5j+?tCO?n)3G$m_k-t@Aj z8r5y;DU}xOK^wwEt%KiWo$Ga)Qko3@oH@gw~zc?bL+Uk&r?%C2~I*hT>I~f9hqLI`uerXmPgF< z$PDOHNxc&CM)ubRf7$Dw0{*ax?rsVRT{CUbf~5V->Le($@k+vlQk&b{3C zn^*Mz1f^U*Tdi+=wLyll8-Mxp)st=wCcb3ZXA6Qgh}_n9Mrq(qpfqvsG8Ds91GAQ(AxZjyI|&7tiU7-LY%iho369r|_N3UvXo; zQe=Pbow|L@T@yLwvorTtBycF#R5=MqHcItEq2($$8pI3~}R4|!&HJ+|mmRJkmFypZRh dWS#n9`{~v#r-kG#!ht0ggQu&X%Q~loCIEmnIDP;C literal 0 HcmV?d00001 diff --git a/html/class_e_vs___absolute_i_m_u-members.html b/html/class_e_vs___absolute_i_m_u-members.html new file mode 100644 index 0000000..bf20141 --- /dev/null +++ b/html/class_e_vs___absolute_i_m_u-members.html @@ -0,0 +1,173 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_AbsoluteIMU Member List
+
+
+ +

This is the complete list of members for EVs_AbsoluteIMU, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
beginCompassCalibration()EVs_AbsoluteIMU
checkAddress() (defined in EVShieldI2C)EVShieldI2C
endCompassCalibration()EVs_AbsoluteIMU
EVs_AbsoluteIMU(uint8_t i2c_address=0x22)EVs_AbsoluteIMU
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_AbsoluteIMU
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readAccelerometer(accl &currAccelerometer)EVs_AbsoluteIMU
readByte(uint8_t location)EVShieldI2C
readCompass(cmps &currCompass)EVs_AbsoluteIMU
readGyro(gyro &currGyro)EVs_AbsoluteIMU
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readMagneticField(magnetic_field &currMagnetic_field)EVs_AbsoluteIMU
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___absolute_i_m_u.html b/html/class_e_vs___absolute_i_m_u.html new file mode 100644 index 0000000..7f434e2 --- /dev/null +++ b/html/class_e_vs___absolute_i_m_u.html @@ -0,0 +1,481 @@ + + + + + + +EVShield: EVs_AbsoluteIMU Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_AbsoluteIMU Class Reference
+
+
+ +

This class interfaces with AbsoluteIMU sensor attached to EVShield. + More...

+ +

#include <EVs_AbsoluteIMU.h>

+
+Inheritance diagram for EVs_AbsoluteIMU:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_AbsoluteIMU (uint8_t i2c_address=0x22)
 
uint8_t issueCommand (char command)
 
void readGyro (gyro &currGyro)
 
void readCompass (cmps &currCompass)
 
void readAccelerometer (accl &currAccelerometer)
 
void readMagneticField (magnetic_field &currMagnetic_field)
 
bool beginCompassCalibration ()
 
bool endCompassCalibration ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with AbsoluteIMU sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_AbsoluteIMU::EVs_AbsoluteIMU (uint8_t i2c_address = 0x22)
+
+

constructor for the AbsoluteIMU; may supply an optional custom i2c address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_AbsoluteIMU::beginCompassCalibration ()
+
+

Start Compass calibration

+
Returns
boolean value for success or failure
+ +
+
+ +
+
+ + + + + + + +
bool EVs_AbsoluteIMU::endCompassCalibration ()
+
+

End Compass calibration

+
Returns
boolean value for success or failure
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_AbsoluteIMU::issueCommand (char command)
+
+

write a command byte at the command register of the device

+ +
+
+ +
+
+ + + + + + + + +
void EVs_AbsoluteIMU::readAccelerometer (acclcurrAccelerometer)
+
+

Get the Tilt and Accelerometer readings from the IMU

+
Parameters
+ + +
acclstructure
+
+
+
Returns
parameter is returned with values
+ +
+
+ +
+
+ + + + + + + + +
void EVs_AbsoluteIMU::readCompass (cmpscurrCompass)
+
+

Get the Compass readings from the IMU

+
Parameters
+ + +
cmpsstructure
+
+
+
Returns
parameter is returned with values
+ +
+
+ +
+
+ + + + + + + + +
void EVs_AbsoluteIMU::readGyro (gyrocurrGyro)
+
+

Get the Gyro readings from the IMU

+
Parameters
+ + +
gyrostructure
+
+
+
Returns
parameter is returned with values
+ +
+
+ +
+
+ + + + + + + + +
void EVs_AbsoluteIMU::readMagneticField (magnetic_fieldcurrMagnetic_field)
+
+

Get the Magnetometer readings from the IMU

+
Parameters
+ + +
magnetic_fieldstructure
+
+
+
Returns
parameter is returned with values
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___absolute_i_m_u.js b/html/class_e_vs___absolute_i_m_u.js new file mode 100644 index 0000000..83c9125 --- /dev/null +++ b/html/class_e_vs___absolute_i_m_u.js @@ -0,0 +1,11 @@ +var class_e_vs___absolute_i_m_u = +[ + [ "EVs_AbsoluteIMU", "class_e_vs___absolute_i_m_u.html#a32c8c421886f7910ba3ee235aaf41f00", null ], + [ "beginCompassCalibration", "class_e_vs___absolute_i_m_u.html#ada5ecacef2e38e95a0fe3cd1f47486ee", null ], + [ "endCompassCalibration", "class_e_vs___absolute_i_m_u.html#a1ebca36af4f238561032e178968c377c", null ], + [ "issueCommand", "class_e_vs___absolute_i_m_u.html#a79fae749fad6df0e8df7a4c07227574b", null ], + [ "readAccelerometer", "class_e_vs___absolute_i_m_u.html#afd7d0cc3144ca8e298d243704661c8cf", null ], + [ "readCompass", "class_e_vs___absolute_i_m_u.html#a17244ab1f6414c78bd5158b8e60fd25a", null ], + [ "readGyro", "class_e_vs___absolute_i_m_u.html#ac9d08d4dbf62dfcc465b8423290cffc2", null ], + [ "readMagneticField", "class_e_vs___absolute_i_m_u.html#a4a7eedefe6f8a786f9e6fa86dc3f7662", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___absolute_i_m_u.png b/html/class_e_vs___absolute_i_m_u.png new file mode 100644 index 0000000000000000000000000000000000000000..ba8c4468d9aca2ba97ec04ec81fa8b2d0be21b97 GIT binary patch literal 1049 zcmeAS@N?(olHy`uVBq!ia0vp^Z-BUigBeI(&iI}Mq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ0S9rQOhEy=Vo%?puW-S4>+wEHK|4;H4 zVr4&)QhuK~a88Jomf{%``N{iR1f0S>)(bej;BuT~m6WQwQdv*i^K3z+XV&?(smq^x zPtvlv{djx!_U3o)$~Dt;k5${)$mKrB`D1i$_YTvW=KDJneYcn2Rb6=~`exD|(yoes7HDJ?*P{@yhB=r{15-kxaXtY(GVJ`7?LctnJQPjlDTDGs-Tg z-2A>fcaB=d+{WCVuADdX*Sjrks$F+%>(0~6$B*7s%@UrtWDfsr3xAvF^?y&@vb_KG zPi$k=_Q0Z>Mi&=5{cSg%&6{dIL-*qUg0y<2+3&9&HrDoJZBH*-+vIAxE&loc%`bOp zKi|Ld*vtBBBHvB>MK;Wco1GEXtE#zt%G4#>YV0;oy23Jj>XNh_YgD!#2ZomdWrRiwH~*D5_VjW=ESj3o8i8aN057r*aCK- z<-I^d4Z`yyXYa1nOMUCN|J^CO?`v~SyH>VH z-pnmkU3pA2CAaaGNdIk>m8VvwzD<(Nx%c)=n(H5{s}}Pji<7#IqgNk$89x2j{HaUK zfL`K{37aJKa1(T#vuZT9}U$oul# zkiV<1{`e`=`k701zu)4yj$#YApHGdw_PhS<`EXE7abMt=&I*qGN4qy&Hu1G({9*l{ ZQA^E(?-KWQ6<|JQ@O1TaS?83{1OQ#%^4S0Y literal 0 HcmV?d00001 diff --git a/html/class_e_vs___angle_sensor-members.html b/html/class_e_vs___angle_sensor-members.html new file mode 100644 index 0000000..ce9ca11 --- /dev/null +++ b/html/class_e_vs___angle_sensor-members.html @@ -0,0 +1,170 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_AngleSensor Member List
+
+
+ +

This is the complete list of members for EVs_AngleSensor, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_AngleSensor(uint8_t i2c_address=0x30)EVs_AngleSensor
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getAngle()EVs_AngleSensor
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getRawReading()EVs_AngleSensor
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_AngleSensor
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
reset()EVs_AngleSensor
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___angle_sensor.html b/html/class_e_vs___angle_sensor.html new file mode 100644 index 0000000..39596cf --- /dev/null +++ b/html/class_e_vs___angle_sensor.html @@ -0,0 +1,395 @@ + + + + + + +EVShield: EVs_AngleSensor Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_AngleSensor Class Reference
+
+
+ +

This class interfaces with sensor attached to EVShield. + More...

+ +

#include <EVs_AngleSensor.h>

+
+Inheritance diagram for EVs_AngleSensor:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_AngleSensor (uint8_t i2c_address=0x30)
 
uint8_t issueCommand (char command)
 
long getAngle ()
 
long getRawReading ()
 
void reset ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_AngleSensor::EVs_AngleSensor (uint8_t i2c_address = 0x30)
+
+

Constructor for the class; may supply an optional custom i2c address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
long EVs_AngleSensor::getAngle ()
+
+

Get the angle position

+
Returns
angle value
+ +
+
+ +
+
+ + + + + + + +
long EVs_AngleSensor::getRawReading ()
+
+

Get the raw reading from the device (twice the angle value)

+
Returns
raw reading
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_AngleSensor::issueCommand (char command)
+
+

Write a command byte at the command register of the device

+ +
+
+ +
+
+ + + + + + + +
void EVs_AngleSensor::reset ()
+
+

Reset the angle value to zero.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___angle_sensor.js b/html/class_e_vs___angle_sensor.js new file mode 100644 index 0000000..d22fe0e --- /dev/null +++ b/html/class_e_vs___angle_sensor.js @@ -0,0 +1,8 @@ +var class_e_vs___angle_sensor = +[ + [ "EVs_AngleSensor", "class_e_vs___angle_sensor.html#a8cb3459b4a28d7f1360a90804dbb1e4b", null ], + [ "getAngle", "class_e_vs___angle_sensor.html#ad51376f4404cf784a6130ab93cc86404", null ], + [ "getRawReading", "class_e_vs___angle_sensor.html#a48602ec9b9970a7521189924311e0338", null ], + [ "issueCommand", "class_e_vs___angle_sensor.html#a2ee7d5f99ff8d4ec8cdbeb39a69a2bae", null ], + [ "reset", "class_e_vs___angle_sensor.html#a2acde0c2ad2f19207c52001e8161005c", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___angle_sensor.png b/html/class_e_vs___angle_sensor.png new file mode 100644 index 0000000000000000000000000000000000000000..0f3969be31b4507bfdbaf96a8cedfadde85b4fa0 GIT binary patch literal 1080 zcmeAS@N?(olHy`uVBq!ia0vp^AAq=ngBeJ^`!$URNJ#|vgt-3y{~ySF@#br3|Dg#$ z78oBmaDcV*jy#adQ4-`A%m7pb0#{Fk7%?y~ANO=|45?szJNMzG&00Kc*V`rE|DWU^ zEy}!Ter>hO(UM)Ef~wLAf4w;rL)w0DDz=;wP+6%J7BOknqeGKQ4D@t7w-!8n_jlqF zruW}ozPpjT^!F|4Zyf3QHL-j2-d;G#@zZ0rvUsccyjg5!cem~G4(iN(_@?)9LfVTN z?8QIqTaMTG?N8frvbgU5o%+7~I!C#~d=Gy-`2E~@-?23tI8E)oyo}ipFY0HMZL-Pd zxLS5p#*Zw|^x)kxzb+fh5pn9>>$Q3B&i2oZ&#rC@w(viHZqe2V?be081#(%N-m0kH zKdUNx*(5Eo&fBr#)%fGH3tEdpNGPDS1l%kGhok;p86O^c!h)7eC)# zv~_Dr&_kOmTbceXx1F=+jGk%quKHVtt6MIY?%vg|s+nHP-@nyx^`&oRzwBlDyN&+G zPVM`Dc-fo&iANMStK1HltflKI$(`tFHAA*KVp8A1R@IjYF%grp9>RjEVo?Ey;+3Nu z?E+4*4FBBt3&hfS{+T@7XMgcW&%ya>f22OyJT_*lpR*x6v!QB-!GVK23>IIMYfBZ`HFIjfEIIsb5(=-M_|a*&-i$`C4S#|qdIV)Yy+yCMgo?;P#PO9 z+3K%rsCXMgql!%YIgnm(7mxqjW-QBbtAXXS0bL(g-TpWNDFukQTA zGhy+E*9LcGrXM!g{Q2?Y)HhgxvJEa z9=UGwkN!O*t#5Yt^Qp~^sV@xo|Y4N^5BlJ$y&1i+c!H+2z#l`$z0?9mz}XLz4%Asz3H*jQe_g + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_CurrentMeter Member List
+
+
+ +

This is the complete list of members for EVs_CurrentMeter, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_CurrentMeter(uint8_t i2c_address=0x28)EVs_CurrentMeter
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getACurrent()EVs_CurrentMeter
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getRCurrent()EVs_CurrentMeter
getReference()EVs_CurrentMeter
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_CurrentMeter
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setReferenceI()EVs_CurrentMeter
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___current_meter.html b/html/class_e_vs___current_meter.html new file mode 100644 index 0000000..6fdfa4b --- /dev/null +++ b/html/class_e_vs___current_meter.html @@ -0,0 +1,414 @@ + + + + + + +EVShield: EVs_CurrentMeter Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_CurrentMeter Class Reference
+
+
+ +

This class interfaces with sensor attached to EVShield. + More...

+ +

#include <EVs_NXTCurrentMeter.h>

+
+Inheritance diagram for EVs_CurrentMeter:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_CurrentMeter (uint8_t i2c_address=0x28)
 
uint8_t issueCommand (char command)
 
int getACurrent ()
 
int getRCurrent ()
 
int getReference ()
 
int setReferenceI ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_CurrentMeter::EVs_CurrentMeter (uint8_t i2c_address = 0x28)
+
+

Constructor for the class; may supply an optional custom i2c address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int EVs_CurrentMeter::getACurrent ()
+
+

Get the Absolute Current

+
Returns
Absolute Current value
+ +
+
+ +
+
+ + + + + + + +
int EVs_CurrentMeter::getRCurrent ()
+
+

Get the Relative Current

+
Returns
Relative Current value
+ +
+
+ +
+
+ + + + + + + +
int EVs_CurrentMeter::getReference ()
+
+

Get the Reference Current

+
Returns
Reference Current value
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_CurrentMeter::issueCommand (char command)
+
+

Write a command byte at the command register of the device

+ +
+
+ +
+
+ + + + + + + +
int EVs_CurrentMeter::setReferenceI ()
+
+

Set the Reference Current to Absolute Current

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___current_meter.js b/html/class_e_vs___current_meter.js new file mode 100644 index 0000000..21ecbc4 --- /dev/null +++ b/html/class_e_vs___current_meter.js @@ -0,0 +1,9 @@ +var class_e_vs___current_meter = +[ + [ "EVs_CurrentMeter", "class_e_vs___current_meter.html#ac7ad196cf69b8ba3220b65648533d7cc", null ], + [ "getACurrent", "class_e_vs___current_meter.html#a2875f2982c30a8f450e20c90b5858dbb", null ], + [ "getRCurrent", "class_e_vs___current_meter.html#ac92eb33a56d92bee587e1edfb72f4ccf", null ], + [ "getReference", "class_e_vs___current_meter.html#a50f92cd5d50331ecb865e1f1dc85e091", null ], + [ "issueCommand", "class_e_vs___current_meter.html#a7b77b83a76114872b1121df6dd9a7d2a", null ], + [ "setReferenceI", "class_e_vs___current_meter.html#ae89a3ba494f805570801ddb1b68b7263", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___current_meter.png b/html/class_e_vs___current_meter.png new file mode 100644 index 0000000000000000000000000000000000000000..2aa55d3b6da315ab8515d1c3a002d32f0c51435d GIT binary patch literal 1067 zcmeAS@N?(olHy`uVBq!ia0vp^-+;J-gBeIZe)7y4NJ#|vgt-3y{~ySF@#br3|Dg#$ z78oBmaDcV*jy#adQ4-`A%m7pb0#{Fk7%?y~@A7nU45?szJNNCS)e1ap*V`rE|DWW) zy2}&hV|~{Wx z%dZ-=-@h1l&Gg?a#>H=~4&ADs`|wx8Umd;7<+JbG3*Vlz`BvJlm&;ZbXY%%K-7IQm zG+Wf)_uBRg3MXsyReq|S`TcNt+fV<*T`R*4KRvImw!Si}T72vF?k}yAww<1P=!09e z_1zp}ub^X-vAh&@{CX@g2^U^uzr%ikMzUqY3w78dbo?1o8Z{JA#y=?WS`rPzKhmPEvwB`A~ zTRTsb_&CNN{{L(9I*-g;m6`9Gx1`_xIl;B;=QC-iNqsy2-`ghkt!8!Z_k;fh-j;{m z4pW}pHSc1avYscqjmPb2TSC9>@SW6G(X@^Cfn(PCYU^r7n~jr>@69dymX;5Ugk7%} zzR&giWsK~&9otl{9^A?(CE&#Im9aug*`fZ+O548Js_!fRZhCidcX00dCk%fd++x^E z0`5!w-ftRQ)j+&4RU-NnZLlgR!M&d&|!XUc9qu;%62t>-7(XfwOtYJd8-?N;{H zo7;|_sP*{t`Pl4txtD{g^7m(#eseml)wFY#R^_UXf~IrGTCV pM;$PtW%Cx;@*ED3ZJ7UoKeNPJjWdT~A24S#c)I$ztaD0e0sscHB9{OF literal 0 HcmV?d00001 diff --git a/html/class_e_vs___d_i_s_t_nx-members.html b/html/class_e_vs___d_i_s_t_nx-members.html new file mode 100644 index 0000000..555efa4 --- /dev/null +++ b/html/class_e_vs___d_i_s_t_nx-members.html @@ -0,0 +1,172 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_DISTNx Member List
+
+
+ +

This is the complete list of members for EVs_DISTNx, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
deEnergize()EVs_DISTNx
energize()EVs_DISTNx
EVs_DISTNx(uint8_t i2c_address=0x02)EVs_DISTNx
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getDist()EVs_DISTNx
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getType()EVs_DISTNx
getVendorID()EVShieldI2C
getVolt()EVs_DISTNx
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_DISTNx
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___d_i_s_t_nx.html b/html/class_e_vs___d_i_s_t_nx.html new file mode 100644 index 0000000..8dabc74 --- /dev/null +++ b/html/class_e_vs___d_i_s_t_nx.html @@ -0,0 +1,429 @@ + + + + + + +EVShield: EVs_DISTNx Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_DISTNx Class Reference
+
+
+ +

This class interfaces with DIST-Nx attached to EVShield. + More...

+ +

#include <EVs_DISTNx.h>

+
+Inheritance diagram for EVs_DISTNx:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_DISTNx (uint8_t i2c_address=0x02)
 
uint8_t issueCommand (char command)
 
bool energize ()
 
bool deEnergize ()
 
int getDist ()
 
int getVolt ()
 
short getType ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with DIST-Nx attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_DISTNx::EVs_DISTNx (uint8_t i2c_address = 0x02)
+
+

device constructor for DISTNx; custom i2c address is an optional parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_DISTNx::deEnergize ()
+
+

power off the device module

+ +
+
+ +
+
+ + + + + + + +
bool EVs_DISTNx::energize ()
+
+

power on the device module

+ +
+
+ +
+
+ + + + + + + +
int EVs_DISTNx::getDist ()
+
+

get the distance of from the DISTNx in millimeters

+ +
+
+ +
+
+ + + + + + + +
short EVs_DISTNx::getType ()
+
+

get the Sharp IR module type

+ +
+
+ +
+
+ + + + + + + +
int EVs_DISTNx::getVolt ()
+
+

get the output voltage of the sensor

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_DISTNx::issueCommand (char command)
+
+

issue a byte command to the command register of the device

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___d_i_s_t_nx.js b/html/class_e_vs___d_i_s_t_nx.js new file mode 100644 index 0000000..de195e4 --- /dev/null +++ b/html/class_e_vs___d_i_s_t_nx.js @@ -0,0 +1,10 @@ +var class_e_vs___d_i_s_t_nx = +[ + [ "EVs_DISTNx", "class_e_vs___d_i_s_t_nx.html#aed6d1c464190d1341a0c3f5c638acefe", null ], + [ "deEnergize", "class_e_vs___d_i_s_t_nx.html#a3b0557c33c9f2bc65e2146c1e9dc5334", null ], + [ "energize", "class_e_vs___d_i_s_t_nx.html#aa3564416846550ef99d3d7952d156cb5", null ], + [ "getDist", "class_e_vs___d_i_s_t_nx.html#a9ef329ef592ed78757e38a9588ec7685", null ], + [ "getType", "class_e_vs___d_i_s_t_nx.html#a782e008c817d83c0014ff12b66d7c1df", null ], + [ "getVolt", "class_e_vs___d_i_s_t_nx.html#acd232735706600df747f030bed5b18ab", null ], + [ "issueCommand", "class_e_vs___d_i_s_t_nx.html#ab50d1fd75b92734f916925d1e7fc460a", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___d_i_s_t_nx.png b/html/class_e_vs___d_i_s_t_nx.png new file mode 100644 index 0000000000000000000000000000000000000000..e49d56698c989b7b1fec7658102e8ee5d4697278 GIT binary patch literal 997 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*8U*PmQ| zmy54sp6<EG(QOTV0oy+%r zze?$kY0vAgXR%-1Z7aiJYFkrRQ+I3OD!JS9`k(FMoO|UI^USRDtE!>l@he^?zP-Z} zYI8Q%B_nqJpWI#N<)Z7O|K{37v+w-W8L;xl-(L&w3WuHWS!?oZWzL&2r>kBwGtIQa zyViIve^7GTbm2|@ufZE^N|uFX-OMOGA8`BQHtRagkk|5Rt+6@Q&XNnuvaT9h+%0mg z-g+mhw58~8RqtD-xhXsEbzO0Os_=GMTDzU_s;WD(^XgjOc)iQ|7awH7U8sA-Z|!V` z`s%h-$I7yATq%Fa^Ve;~z3}$*7k_NGJe#F<`sV)E-vf5Ozx1SXn)Z9e$!gapo)$Q} z=;q4M$aU%}p5}!`Z7MJGITby3d2o1M(oj_K6bEvop7uHc15V#fW9gK4tPiA&4+Ps7 z-niZJ?5E>mb++o+7t%YP_so-cQ|dJFDZ?>N#fI({fdd+fECmw`-z)#uaZ;jper`Mx4+2w6tm9RGSmiMOX_F}8v-CQH_E?ciY^=ZuQ`2n^^=T~!H z5!-bB@UvT+%QUuB=xo=LdL5eY@0sOQ-JsK0)QLA;>AfU{Q7A zNSGrqX^A(`mlmJ|#n3mC@!kBiMqk1(v$HOW%fgo%>a{R`j~qUpBs$RlogKoS5Cc3k6vdNl6JUK-0D_Q zZqNzeJ-It47tBfDX*%oOB&W)&PwZFeZm;JLb>iDBb0Ge4Kt|{77e|zw7#;&X3h^}4 ljw6?yE}Qs%XEHcYU;ooy_DLdxCNNJjc)I$ztaD0e0svDH#ohn_ literal 0 HcmV?d00001 diff --git a/html/class_e_vs___e_v3_color-members.html b/html/class_e_vs___e_v3_color-members.html new file mode 100644 index 0000000..6d6c366 --- /dev/null +++ b/html/class_e_vs___e_v3_color-members.html @@ -0,0 +1,141 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Color Member List
+
+
+ +

This is the complete list of members for EVs_EV3Color, including all inherited members.

+ + + + + + + + + + + + + + + + +
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getMode()EVShieldUART
getVal()EVs_EV3Color
init(EVShield *shield, SH_BankPort bp)EVs_EV3Color
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readValue()EVShieldUART
setMode(char newMode)EVShieldUART
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_vs___e_v3_color.html b/html/class_e_vs___e_v3_color.html new file mode 100644 index 0000000..fbac06b --- /dev/null +++ b/html/class_e_vs___e_v3_color.html @@ -0,0 +1,232 @@ + + + + + + +EVShield: EVs_EV3Color Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_EV3Color Class Reference
+
+
+ +

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. + More...

+ +

#include <EVs_EV3Color.h>

+
+Inheritance diagram for EVs_EV3Color:
+
+
+ + +EVShieldUART + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
float getVal ()
 
- Public Member Functions inherited from EVShieldUART
 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldUART
EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + +
float EVs_EV3Color::getVal ()
+
+

get the distance to obstacle (in cm or inches based on the mode.)

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_EV3Color::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the device and tell where it is connected

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___e_v3_color.js b/html/class_e_vs___e_v3_color.js new file mode 100644 index 0000000..c6fa42e --- /dev/null +++ b/html/class_e_vs___e_v3_color.js @@ -0,0 +1,5 @@ +var class_e_vs___e_v3_color = +[ + [ "getVal", "class_e_vs___e_v3_color.html#ab6ae28df2698f352ce127920309fa3bf", null ], + [ "init", "class_e_vs___e_v3_color.html#abcdaa258bbc2046cfcf88d561f8194f7", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___e_v3_color.png b/html/class_e_vs___e_v3_color.png new file mode 100644 index 0000000000000000000000000000000000000000..4f925d8ddc10e2966b6dbfd9f8805bcc79d2dea3 GIT binary patch literal 492 zcmeAS@N?(olHy`uVBq!ia0vp^i9j5{!3-qr{=J?Fq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IXgt36#DLn;{G&VAjt+JJ{mz3w|w*4n9p9f5Ibz$1dp`!p2|@oK`e~Vh3^BS)4a;2_ zK5XG&m?y?~;Ia}!MHCBzfBobML0$`$7+JCe8Ek4N2K89@m-Dw7&Q!@u6{1-oD!M<^_kaM literal 0 HcmV?d00001 diff --git a/html/class_e_vs___e_v3_gyro-members.html b/html/class_e_vs___e_v3_gyro-members.html new file mode 100644 index 0000000..a853245 --- /dev/null +++ b/html/class_e_vs___e_v3_gyro-members.html @@ -0,0 +1,143 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Gyro Member List
+
+
+ +

This is the complete list of members for EVs_EV3Gyro, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getAngle()EVs_EV3Gyro
getMode()EVShieldUART
getRefAngle()EVs_EV3Gyro
init(EVShield *shield, SH_BankPort bp) (defined in EVs_EV3Gyro)EVs_EV3Gyro
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readValue()EVShieldUART
setMode(char newMode)EVShieldUART
setRef()EVs_EV3Gyro
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_vs___e_v3_gyro.html b/html/class_e_vs___e_v3_gyro.html new file mode 100644 index 0000000..b5bf70a --- /dev/null +++ b/html/class_e_vs___e_v3_gyro.html @@ -0,0 +1,242 @@ + + + + + + +EVShield: EVs_EV3Gyro Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_EV3Gyro Class Reference
+
+
+ +

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. + More...

+ +

#include <EVs_EV3Gyro.h>

+
+Inheritance diagram for EVs_EV3Gyro:
+
+
+ + +EVShieldUART + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+bool init (EVShield *shield, SH_BankPort bp)
 
int getAngle ()
 
int getRefAngle ()
 
int setRef ()
 
- Public Member Functions inherited from EVShieldUART
 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldUART
EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + +
int EVs_EV3Gyro::getAngle ()
+
+

get the angle of the Gyro sensor

+ +
+
+ +
+
+ + + + + + + +
int EVs_EV3Gyro::getRefAngle ()
+
+

reset the angle to zero

+ +
+
+ +
+
+ + + + + + + +
int EVs_EV3Gyro::setRef ()
+
+

reset the angle to zero

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___e_v3_gyro.js b/html/class_e_vs___e_v3_gyro.js new file mode 100644 index 0000000..ad8d3ec --- /dev/null +++ b/html/class_e_vs___e_v3_gyro.js @@ -0,0 +1,7 @@ +var class_e_vs___e_v3_gyro = +[ + [ "getAngle", "class_e_vs___e_v3_gyro.html#abf015ec0446a5b387488347de1a81da3", null ], + [ "getRefAngle", "class_e_vs___e_v3_gyro.html#aec96379abb38042a44fcb7ec0439b583", null ], + [ "init", "class_e_vs___e_v3_gyro.html#ac0280ccd5e00cb66f741553381118987", null ], + [ "setRef", "class_e_vs___e_v3_gyro.html#a8b9bbd0edd4cfaa5f5bebe921bd97950", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___e_v3_gyro.png b/html/class_e_vs___e_v3_gyro.png new file mode 100644 index 0000000000000000000000000000000000000000..09a734a1c5a27770859374ee5da12c2f747c6fb6 GIT binary patch literal 504 zcmVvTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d0004pNkli-^Q&14KkzeGib1 z&vQLb*UhzUi@7*<&EX1CVx3nFVBD2=i|hcB+3WWVfb;Q&SQBX}JvSc%&ba4N|JtsW zQ$NTBl(Ol%t8))98K@M?v(_1ubakQ2qstf!fZ=gB0J_O7Y=5T=T~pQo{f0$hx*psE z4E3{V&!)(JRbBu@L?W~SA|kFfKt#mVHvl>394LUd^ZXcDlv0Wm2_Q}z0O0D2fUD=%xyO#y<9JyB z7E%DS4uIZzFv^8P7y-&n`Hj}bG51G6m6QX}?lZsm-vLZZRIH|mwfOe{c2w3@Q}-KyQsrtiC7M|4_dw6;HGh*S0{BStK(7Gh uM;*Y|;(z`ugH@RQa}D6?Cjcp>6sUiE!xX`9cMY5X0000 + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Infrared Member List
+
+
+ +

This is the complete list of members for EVs_EV3Infrared, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getMode()EVShieldUART
init(EVShield *shield, SH_BankPort bp)EVs_EV3Infrared
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readChannelButton(uint8_t channel)EVs_EV3Infrared
readChannelHeading(uint8_t channel)EVs_EV3Infrared
readChannelProximity(uint8_t channel) (defined in EVs_EV3Infrared)EVs_EV3Infrared
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readProximity()EVs_EV3Infrared
readValue()EVShieldUART
setMode(char newMode)EVShieldUART
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_vs___e_v3_infrared.html b/html/class_e_vs___e_v3_infrared.html new file mode 100644 index 0000000..0a2468c --- /dev/null +++ b/html/class_e_vs___e_v3_infrared.html @@ -0,0 +1,273 @@ + + + + + + +EVShield: EVs_EV3Infrared Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_EV3Infrared Class Reference
+
+
+ +

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. + More...

+ +

#include <EVs_EV3Infrared.h>

+
+Inheritance diagram for EVs_EV3Infrared:
+
+
+ + +EVShieldUART + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
uint16_t readProximity ()
 
int8_t readChannelHeading (uint8_t channel)
 
+uint8_t readChannelProximity (uint8_t channel)
 
uint8_t readChannelButton (uint8_t channel)
 
- Public Member Functions inherited from EVShieldUART
 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldUART
EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_EV3Infrared::init (EVShieldshield,
SH_BankPort bp 
)
+
+

check if the touch sensor is pressed

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_EV3Infrared::readChannelButton (uint8_t channel)
+
+

in mode MODE_Infrared_Remote

+ +
+
+ +
+
+ + + + + + + + +
int8_t EVs_EV3Infrared::readChannelHeading (uint8_t channel)
+
+

in mode: MODE_Infrared_Beacon and MODE_InfraRed_Proximity

+ +
+
+ +
+
+ + + + + + + +
uint16_t EVs_EV3Infrared::readProximity ()
+
+

for mode MODE_Infrared_Proximity

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___e_v3_infrared.js b/html/class_e_vs___e_v3_infrared.js new file mode 100644 index 0000000..348fd86 --- /dev/null +++ b/html/class_e_vs___e_v3_infrared.js @@ -0,0 +1,8 @@ +var class_e_vs___e_v3_infrared = +[ + [ "init", "class_e_vs___e_v3_infrared.html#afe31e6e83a978c65ade722f625827ca1", null ], + [ "readChannelButton", "class_e_vs___e_v3_infrared.html#a0f2a63402c6bd1e2361e706dfdd83318", null ], + [ "readChannelHeading", "class_e_vs___e_v3_infrared.html#ab9c060084e2ab15a78e593d411e27031", null ], + [ "readChannelProximity", "class_e_vs___e_v3_infrared.html#a9b9e3402b9b0a28afb61057043066071", null ], + [ "readProximity", "class_e_vs___e_v3_infrared.html#a766623a579e6acc47cf303269e9b3a37", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___e_v3_infrared.png b/html/class_e_vs___e_v3_infrared.png new file mode 100644 index 0000000000000000000000000000000000000000..65308884753dbff6d92b7718cc7a576771c3720f GIT binary patch literal 531 zcmV+u0_^>XP)vTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d0004^Nkl5l6l3`P$|>ia+PqzQ}7GP$ihM7pBNR}3T^Z&CgdV~h($6cJgb%@Yyv)6=|g z{*LjQrIlpX!7Q9seIOl@&#F%hd1h3H*~cclU~J>w4etugI8ef@0Uw4p@4{R|xvEui zul@Ukms755rsgfr#HSLFy%Z61P2cX1r+q~~sReJODp!9)O=V55P~G2jHj81Mt)40SpvE2n$63Sfo<%~@p_-tE#vsg(lDR8p(i};S?#iW-nbjmuF6!y8|3JB zo^8VU?mzPG>Q`McFIT^7i(~Ss8fey^01I@(%O5QO7wzu@fS)!Gz)$b5NeCe<(+@I` V7yMWqyAA*V002ovPDHLkV1jTX`uhL? literal 0 HcmV?d00001 diff --git a/html/class_e_vs___e_v3_touch-members.html b/html/class_e_vs___e_v3_touch-members.html new file mode 100644 index 0000000..f5e7111 --- /dev/null +++ b/html/class_e_vs___e_v3_touch-members.html @@ -0,0 +1,143 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Touch Member List
+
+
+ +

This is the complete list of members for EVs_EV3Touch, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getBumpCount()EVs_EV3Touch
getMode()EVShieldUART
init(EVShield *shield, SH_BankPort bp)EVs_EV3Touch
isPressed()EVs_EV3Touch
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readValue()EVShieldUART
resetBumpCount()EVs_EV3Touch
setMode(char newMode)EVShieldUART
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_vs___e_v3_touch.html b/html/class_e_vs___e_v3_touch.html new file mode 100644 index 0000000..25416da --- /dev/null +++ b/html/class_e_vs___e_v3_touch.html @@ -0,0 +1,269 @@ + + + + + + +EVShield: EVs_EV3Touch Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_EV3Touch Class Reference
+
+
+ +

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. + More...

+ +

#include <EVs_EV3Touch.h>

+
+Inheritance diagram for EVs_EV3Touch:
+
+
+ + +EVShieldUART + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
bool isPressed ()
 
int getBumpCount ()
 
bool resetBumpCount ()
 
- Public Member Functions inherited from EVShieldUART
 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldUART
EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + +
int EVs_EV3Touch::getBumpCount ()
+
+

You can get bump count for EV3Touch Sensor (an incremental pressed value) this function will return the bump count since last reset. (The max value of bumpCount is 254, after that it will not increment).

+

Programming Tip: If you don't want to wait to see if button is pressed, use this bump count, store the old bumpCount in a variable and see if the new bumpCount is larger than the old value.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_EV3Touch::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the interface and tell the shield where the sensor is connected

+ +
+
+ +
+
+ + + + + + + +
bool EVs_EV3Touch::isPressed ()
+
+

check if the touch sensor is pressed (or bumped)

+ +
+
+ +
+
+ + + + + + + +
bool EVs_EV3Touch::resetBumpCount ()
+
+

reset the bump count and start the incremental bumps from zero

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___e_v3_touch.js b/html/class_e_vs___e_v3_touch.js new file mode 100644 index 0000000..0fac8e5 --- /dev/null +++ b/html/class_e_vs___e_v3_touch.js @@ -0,0 +1,7 @@ +var class_e_vs___e_v3_touch = +[ + [ "getBumpCount", "class_e_vs___e_v3_touch.html#a8cf92835871b38179de9f22e71a33de3", null ], + [ "init", "class_e_vs___e_v3_touch.html#ab0dbec05f93f8b6f41334d2deccea791", null ], + [ "isPressed", "class_e_vs___e_v3_touch.html#a47f395a5be2f6f035b218debee9d897a", null ], + [ "resetBumpCount", "class_e_vs___e_v3_touch.html#a5446f7a2b3ee56ecb262a0542f5eab7b", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___e_v3_touch.png b/html/class_e_vs___e_v3_touch.png new file mode 100644 index 0000000000000000000000000000000000000000..9c78fcfbf53aa29015ff0df94c74c985ed97a528 GIT binary patch literal 500 zcmeAS@N?(olHy`uVBq!ia0vp^sX!dS!3-qLMZF&bDTx4|5ZC|z{{xvX-h3_XKQsZz z0^W=|K#kP61Pb6@8jR^V~tcRTgl{?o3u zZr&xm%bS+TA7)D=&(T}daUvzRtE0pHwC2N~)jiL(-Y&_MJ#(x$EZ)O! z)A~)w31?6uR1*g~d+9X)Ki^vUz4NiiZJyaxPNox{a_U%oC9^!DG_|83)xwTZ_{ zg6mq0&O~gx_3D2^lJv`4R!g2Fy)cuxx^&i-*Nvh2m$hQ|#d6jk<^BBWG24#iwd%}Z h_teIpS8Oqej6d)}^s?H2B~WZJc)I$ztaD0e0suV)+(`fc literal 0 HcmV?d00001 diff --git a/html/class_e_vs___e_v3_ultrasonic-members.html b/html/class_e_vs___e_v3_ultrasonic-members.html new file mode 100644 index 0000000..47aff3c --- /dev/null +++ b/html/class_e_vs___e_v3_ultrasonic-members.html @@ -0,0 +1,142 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_EV3Ultrasonic Member List
+
+
+ +

This is the complete list of members for EVs_EV3Ultrasonic, including all inherited members.

+ + + + + + + + + + + + + + + + + +
detect()EVs_EV3Ultrasonic
EVShieldUART()EVShieldUART
EVShieldUART(EVShield *shield, SH_BankPort bp)EVShieldUART
getDist()EVs_EV3Ultrasonic
getMode()EVShieldUART
init(EVShield *shield, SH_BankPort bp)EVs_EV3Ultrasonic
m_bpEVShieldUART
m_offsetEVShieldUART
mp_shieldEVShieldUART
readAndPrint(uint8_t loc, uint8_t len)EVShieldUART
readLocationByte(uint8_t loc)EVShieldUART
readLocationInt(uint8_t loc)EVShieldUART
readValue()EVShieldUART
setMode(char newMode)EVShieldUART
setType(uint8_t type)EVShieldUART
writeLocation(uint8_t loc, uint8_t data)EVShieldUART
+
+ + + + diff --git a/html/class_e_vs___e_v3_ultrasonic.html b/html/class_e_vs___e_v3_ultrasonic.html new file mode 100644 index 0000000..3fa61ae --- /dev/null +++ b/html/class_e_vs___e_v3_ultrasonic.html @@ -0,0 +1,250 @@ + + + + + + +EVShield: EVs_EV3Ultrasonic Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_EV3Ultrasonic Class Reference
+
+
+ +

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. + More...

+ +

#include <EVs_EV3Ultrasonic.h>

+
+Inheritance diagram for EVs_EV3Ultrasonic:
+
+
+ + +EVShieldUART + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
float getDist ()
 
uint8_t detect ()
 
- Public Member Functions inherited from EVShieldUART
 EVShieldUART ()
 
 EVShieldUART (EVShield *shield, SH_BankPort bp)
 
uint8_t getMode ()
 
bool setType (uint8_t type)
 
bool writeLocation (uint8_t loc, uint8_t data)
 
int16_t readLocationInt (uint8_t loc)
 
uint8_t readLocationByte (uint8_t loc)
 
bool init (EVShield *shield, SH_BankPort bp)
 
uint8_t setMode (char newMode)
 
uint16_t readValue ()
 
bool readAndPrint (uint8_t loc, uint8_t len)
 
+ + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldUART
EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + +
uint8_t EVs_EV3Ultrasonic::detect ()
+
+

detect other ultrasonic devices

+ +
+
+ +
+
+ + + + + + + +
float EVs_EV3Ultrasonic::getDist ()
+
+

get the distance to obstacle (in cm or inches based on the mode.)

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_EV3Ultrasonic::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the device and tell where it is connected

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___e_v3_ultrasonic.js b/html/class_e_vs___e_v3_ultrasonic.js new file mode 100644 index 0000000..950f6c1 --- /dev/null +++ b/html/class_e_vs___e_v3_ultrasonic.js @@ -0,0 +1,6 @@ +var class_e_vs___e_v3_ultrasonic = +[ + [ "detect", "class_e_vs___e_v3_ultrasonic.html#ae61d33a289276143eb965843a9253336", null ], + [ "getDist", "class_e_vs___e_v3_ultrasonic.html#a94021036f2b0b4a22ae5611307f24e36", null ], + [ "init", "class_e_vs___e_v3_ultrasonic.html#a1069757b00aad1ef08e36a002dd87be6", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___e_v3_ultrasonic.png b/html/class_e_vs___e_v3_ultrasonic.png new file mode 100644 index 0000000000000000000000000000000000000000..ca5661c7d444680c2660972f84ba82e8d4f6f93f GIT binary patch literal 546 zcmV+-0^R+IP)vTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d00058Nklu$p!3`P$|>ia+P+HkXhEN!0}0X?|=BeZU_2JF|Ap)0c5Q^5&3gDT0~@_94#WUPp2&LOB{>p&SjcP>u#zC`SV58_%uZqiwBcWf^PTOqw^bn(Vd~J1lvwU;o;PLx%&b)djkISpj}q{^bH# kC`SV<)bX_oA%qS30>cCvPEK7`OaK4?07*qoM6N<$f^A^=!2kdN literal 0 HcmV?d00001 diff --git a/html/class_e_vs___light_sensor_array-members.html b/html/class_e_vs___light_sensor_array-members.html new file mode 100644 index 0000000..68efc06 --- /dev/null +++ b/html/class_e_vs___light_sensor_array-members.html @@ -0,0 +1,180 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_LightSensorArray Member List
+
+
+ +

This is the complete list of members for EVs_LightSensorArray, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
calibrateBlack()EVs_LightSensorArray
calibrateWhite()EVs_LightSensorArray
checkAddress() (defined in EVShieldI2C)EVShieldI2C
configureEurope()EVs_LightSensorArray
configureUniversal()EVs_LightSensorArray
configureUS()EVs_LightSensorArray
EVs_LightSensorArray(uint8_t i2c_address=0x02)EVs_LightSensorArray
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getBlackCalibration()EVs_LightSensorArray
getBlackLimit()EVs_LightSensorArray
getCalibrated()EVs_LightSensorArray
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getUncalibrated()EVs_LightSensorArray
getVendorID()EVShieldI2C
getWhiteCalibration()EVs_LightSensorArray
getWhiteLimit()EVs_LightSensorArray
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_LightSensorArray
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
sleep()EVs_LightSensorArray
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
wakeUp()EVs_LightSensorArray
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___light_sensor_array.html b/html/class_e_vs___light_sensor_array.html new file mode 100644 index 0000000..1defd48 --- /dev/null +++ b/html/class_e_vs___light_sensor_array.html @@ -0,0 +1,577 @@ + + + + + + +EVShield: EVs_LightSensorArray Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_LightSensorArray Class Reference
+
+
+ +

This class interfaces with LightSensorArray attached to EVShield. + More...

+ +

#include <EVs_LightSensorArray.h>

+
+Inheritance diagram for EVs_LightSensorArray:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_LightSensorArray (uint8_t i2c_address=0x02)
 
uint8_t issueCommand (char command)
 
bool calibrateWhite ()
 
bool calibrateBlack ()
 
bool sleep ()
 
bool wakeUp ()
 
bool configureUS ()
 
bool configureEurope ()
 
bool configureUniversal ()
 
uint8_t * getCalibrated ()
 
uint8_t * getUncalibrated ()
 
uint8_t * getWhiteLimit ()
 
uint8_t * getBlackLimit ()
 
uint8_t * getWhiteCalibration ()
 
uint8_t * getBlackCalibration ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with LightSensorArray attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_LightSensorArray::EVs_LightSensorArray (uint8_t i2c_address = 0x02)
+
+

Class constructor for LightSensorArray; custom i2c address is an optional parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::calibrateBlack ()
+
+

Calibrate the current input to the device as black

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::calibrateWhite ()
+
+

Calibrate the current input to the device as white

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::configureEurope ()
+
+

Configure sensor for European region (and regions with 50 Hz electrical frequency).

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::configureUniversal ()
+
+

Configure sensor for universal frequency (in this mode the sensor adjusts for any frequency, this is also the default mode).

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::configureUS ()
+
+

Configure Sensor for US region (and regions with 60 Hz electrical frequency).

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getBlackCalibration ()
+
+

Calibrate Black

+
Returns
the current calibration of black
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getBlackLimit ()
+
+

Get the limit at which black changes to white

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getCalibrated ()
+
+

Get the raw readings from the sensor that is calibrated based on black and white calibration values

+
Returns
array of 8 bytes of the sensors' calibrated values.
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getUncalibrated ()
+
+

Get the raw uncalibrated sensor values straight from the sensor

+
Returns
array of 8 bytes of the sensors' uncalibrated values.
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getWhiteCalibration ()
+
+

Calibrate White

+
Returns
Current calibration of white
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LightSensorArray::getWhiteLimit ()
+
+

Get the limit at which white changes to black

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LightSensorArray::issueCommand (char command)
+
+

Write a command byte to the command register of the device

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::sleep ()
+
+

Turn off the LEDs on the device and put it in the sleep state

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LightSensorArray::wakeUp ()
+
+

Turn on the LEDs and wake up the device

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___light_sensor_array.js b/html/class_e_vs___light_sensor_array.js new file mode 100644 index 0000000..c4318cf --- /dev/null +++ b/html/class_e_vs___light_sensor_array.js @@ -0,0 +1,18 @@ +var class_e_vs___light_sensor_array = +[ + [ "EVs_LightSensorArray", "class_e_vs___light_sensor_array.html#abd2afef149cf173f79bde3fea3d468be", null ], + [ "calibrateBlack", "class_e_vs___light_sensor_array.html#a5a61a2b4d49dd1f2319dc4ca5d9ecc40", null ], + [ "calibrateWhite", "class_e_vs___light_sensor_array.html#a999f2078bca8de618989e9d7a6aa5453", null ], + [ "configureEurope", "class_e_vs___light_sensor_array.html#aca5259538afc1390f9f3667a60cb5182", null ], + [ "configureUniversal", "class_e_vs___light_sensor_array.html#ae9c2078df787358fc348a741ea0abf63", null ], + [ "configureUS", "class_e_vs___light_sensor_array.html#aaa496158deea8bd1a4979300a5bf61f5", null ], + [ "getBlackCalibration", "class_e_vs___light_sensor_array.html#ab36c3fbb7f93d28e8c7b9326f10adc0a", null ], + [ "getBlackLimit", "class_e_vs___light_sensor_array.html#a754a2c0e0b92e4d7ebd5339ac5d51595", null ], + [ "getCalibrated", "class_e_vs___light_sensor_array.html#aa1f467c8b704726dca52505770df636a", null ], + [ "getUncalibrated", "class_e_vs___light_sensor_array.html#ad3619b6f5b9acbd5cfaf38704ca5b364", null ], + [ "getWhiteCalibration", "class_e_vs___light_sensor_array.html#a1c7b4d2a180b0578da5bb7a6a113a990", null ], + [ "getWhiteLimit", "class_e_vs___light_sensor_array.html#ac0ef2ebbd22f0317f0e40d047e0dc92d", null ], + [ "issueCommand", "class_e_vs___light_sensor_array.html#ae2f33fc4d08ccc3785d08a444cea3393", null ], + [ "sleep", "class_e_vs___light_sensor_array.html#a7f2cb40bf99a871070fec6f64527d25f", null ], + [ "wakeUp", "class_e_vs___light_sensor_array.html#a98b2d41e55d41c971c4a1a9c646048e2", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___light_sensor_array.png b/html/class_e_vs___light_sensor_array.png new file mode 100644 index 0000000000000000000000000000000000000000..8219611379ea6a33438f770ec1c8d8bf1ff0626c GIT binary patch literal 1285 zcmeAS@N?(olHy`uVBq!ia0y~yU{nLLJ2;quWNr1fLqJL*z$e7@|Ns9$=8HF9OZyK^ z0J6aNz<~p-opbGtyPqr|;+a{qp(R|a_=|NsE*`N7qF8#vnx>Y>Och%krvqGGMCTDqM1@U_N zu2OtHD=%LDs_edF%j1u4X#TL+dd0d5&&#he`zIgIoE!G}OR1QCifESA&ihk>M9ak1 zNqz2GcJ=ZxmsMNRs;@qLpCxtw{FnV+DVsLiRCdN2#pe~wyL)=pv)Ofjt2eFt8Wn8X z`*Trx!IL+$mOb+gogBY+XXT1-n~fLjI^W%$7wUF<%RJ`8)8}TM2~13ly+8Y!rjBWS z;N_@QuV#sF|KNM}-ICDEDF4MbO+xs0?t78;cJc0~|Ey;%`|(Y7{P&bk?f$JzHMf(lj^Sw07Aq-#n$z??29o)rIX^yX>n;->d~$r~AJxduCXA@cP^L z>)-l@n{3s7U63DS`}EO0lW!A3m#?m0H!b<<#cgXpeYd*%<;t$LeUay0u8E7b?Ok?x z<-Edmo?qvG`gCu}FMbbTh^_QARWV)JwnXjfgeyy=CP9MpgmbXw(h}#TE2jkQVtin} zgSo^by>h8qL&xvE{{C~HPMyV|BzLpq<;u-_f`kvS7ICw4c=|FZuH;luF=cF7qSi3s z3X8y`Sqx4=!VVr;Okm0HzyID-Wte}G-Jkctb`L_TQH}caa+a6oQhA15OICbyg2pt| z-Fvn#yZ!mI1z-B(6F*8VO_-Cf)a=bVF*`e}Z}R$^x6O)vWC~fjuAcWHr(7bfp8(-h%Kk`<0x0r`oU(U+E^}6J9=;y1z zxZAFFwI0oxNWp7$EyPRnF2jeDcNm2ljDaC^)xpY_Xg?k6SvWd2TUBA-O_QIC(tDkQ# zeR=oMhV2(kL{0?6?{@5exO`6fOJ4P2TRy#2tB*TLFIslvCEICL>!(~7gxzO7W8I-S z&+&qc;j208b~^su-m>N2a@IK4y_fHWWLrfgzg@WX!oLeQR_?#j{YQ6oW~B7)?!5EI zBHW6(Z-`vj!mwO5f`9FM<_n7Lv-regt7oXi=EuLb%4EBJYnA!h?U$~c`;?J?>*|(& z51CERW+zFmY+5C1YPKrNeEsgI%`c|;ZC{=FZi?@Jh8O+$Dc@dCt}OR;?!BrwTaDv` zvst(F0^_)|Yqqj|2;L?uy1;nXDIL@VYjv$;_uV{T>_q=z+)*B->mHV5I;6 literal 0 HcmV?d00001 diff --git a/html/class_e_vs___line_leader-members.html b/html/class_e_vs___line_leader-members.html new file mode 100644 index 0000000..40b5412 --- /dev/null +++ b/html/class_e_vs___line_leader-members.html @@ -0,0 +1,200 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_LineLeader Member List
+
+
+ +

This is the complete list of members for EVs_LineLeader, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
calibrateBlack()EVs_LineLeader
calibrateWhite()EVs_LineLeader
checkAddress() (defined in EVShieldI2C)EVShieldI2C
configureEurope()EVs_LineLeader
configureUniversal()EVs_LineLeader
configureUS()EVs_LineLeader
EVs_LineLeader(uint8_t i2c_address=0x02)EVs_LineLeader
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getAverage()EVs_LineLeader
getBlackCalibration()EVs_LineLeader
getBlackLimit()EVs_LineLeader
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getKd(uint8_t kd)EVs_LineLeader
getKdFactor(uint8_t kdfact)EVs_LineLeader
getKi(uint8_t ki)EVs_LineLeader
getKiFactor(uint8_t kifact)EVs_LineLeader
getKp(uint8_t kp)EVs_LineLeader
getKpFactor(uint8_t kpfact)EVs_LineLeader
getRawCalibrated()EVs_LineLeader
getRawUncalibrated()EVs_LineLeader
getResult()EVs_LineLeader
getSetPoint()EVs_LineLeader
getSteering()EVs_LineLeader
getVendorID()EVShieldI2C
getWhiteCalibration()EVs_LineLeader
getWhiteLimit()EVs_LineLeader
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
invertLineColorToWhite()EVs_LineLeader
issueCommand(char command)EVs_LineLeader
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
resetColorInversion()EVs_LineLeader
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setKd(uint8_t kd)EVs_LineLeader
setKdFactor(uint8_t kdfact)EVs_LineLeader
setKi(uint8_t ki)EVs_LineLeader
setKiFactor(uint8_t kifact)EVs_LineLeader
setKp(uint8_t kp)EVs_LineLeader
setKpFactor(uint8_t kpfact)EVs_LineLeader
setSetPoint(uint8_t spoint)EVs_LineLeader
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
sleep()EVs_LineLeader
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
takeSnapshot()EVs_LineLeader
wakeUp()EVs_LineLeader
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___line_leader.html b/html/class_e_vs___line_leader.html new file mode 100644 index 0000000..164daa3 --- /dev/null +++ b/html/class_e_vs___line_leader.html @@ -0,0 +1,951 @@ + + + + + + +EVShield: EVs_LineLeader Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_LineLeader Class Reference
+
+
+ +

This class interfaces with NXTLineLeader sensor attached to EVShield. + More...

+ +

#include <EVs_LineLeader.h>

+
+Inheritance diagram for EVs_LineLeader:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_LineLeader (uint8_t i2c_address=0x02)
 
uint8_t issueCommand (char command)
 
bool calibrateWhite ()
 
bool calibrateBlack ()
 
bool sleep ()
 
bool wakeUp ()
 
bool invertLineColorToWhite ()
 
bool resetColorInversion ()
 
bool takeSnapshot ()
 
bool configureUS ()
 
bool configureEurope ()
 
bool configureUniversal ()
 
uint8_t getSetPoint ()
 
bool setSetPoint (uint8_t spoint)
 
uint8_t getKp (uint8_t kp)
 
bool setKp (uint8_t kp)
 
uint8_t getKi (uint8_t ki)
 
bool setKi (uint8_t ki)
 
uint8_t getKd (uint8_t kd)
 
bool setKd (uint8_t kd)
 
uint8_t getKpFactor (uint8_t kpfact)
 
bool setKpFactor (uint8_t kpfact)
 
uint8_t getKiFactor (uint8_t kifact)
 
bool setKiFactor (uint8_t kifact)
 
uint8_t getKdFactor (uint8_t kdfact)
 
bool setKdFactor (uint8_t kdfact)
 
int getSteering ()
 
unsigned char getAverage ()
 
unsigned char getResult ()
 
uint8_t * getRawCalibrated ()
 
uint8_t * getRawUncalibrated ()
 
uint8_t * getWhiteLimit ()
 
uint8_t * getBlackLimit ()
 
uint8_t * getWhiteCalibration ()
 
uint8_t * getBlackCalibration ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with NXTLineLeader sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_LineLeader::EVs_LineLeader (uint8_t i2c_address = 0x02)
+
+

class constructor for LineLeader; custom i2c address is an optional parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_LineLeader::calibrateBlack ()
+
+

calibrate the current input to the device as black

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::calibrateWhite ()
+
+

calibrate the current input to the device as white

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::configureEurope ()
+
+

Configure sensor for European region (and regions with 50 Hz electrical frequency)

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::configureUniversal ()
+
+

Configure sensor for universal frequency (in this mode the sensor adjusts for any frequency, this is also the default mode).

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::configureUS ()
+
+

Configure Sensor for US region (and regions with 60 Hz electrical frequency).

+ +
+
+ +
+
+ + + + + + + +
unsigned char EVs_LineLeader::getAverage ()
+
+

returns a weighted average of the current position of the line in relation to the sensor

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getBlackCalibration ()
+
+

returns the current calibration of black

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getBlackLimit ()
+
+

get the limit at which black changes to white

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKd (uint8_t kd)
+
+

get the current derivative factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKdFactor (uint8_t kdfact)
+
+

Get the Kd factor

+
Returns
kd factor
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKi (uint8_t ki)
+
+

get the current integral factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKiFactor (uint8_t kifact)
+
+

Get the Ki factor

+
Returns
ki factor
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKp (uint8_t kp)
+
+

get the current proportion factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::getKpFactor (uint8_t kpfact)
+
+

Get the Kp factor

+
Returns
kp factor
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getRawCalibrated ()
+
+

get the raw readings from the sensor that is calibrated based on black and white calibration values

+
Returns
array of 8 bytes of the sensors' calibrated values.
+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getRawUncalibrated ()
+
+

get the raw uncalibrated sensor values straight from the sensor

+
Returns
array of 8 bytes of the sensors' uncalibrated values.
+ +
+
+ +
+
+ + + + + + + +
unsigned char EVs_LineLeader::getResult ()
+
+

returns a byte of the current result; each bit corresponds to one light sensor

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_LineLeader::getSetPoint ()
+
+

returns the current setpoint used by the PID control on the device

+ +
+
+ +
+
+ + + + + + + +
int EVs_LineLeader::getSteering ()
+
+

current steering value, add or subtract from the speed of motors on each side

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getWhiteCalibration ()
+
+

returns the current calibration of white

+ +
+
+ +
+
+ + + + + + + +
uint8_t * EVs_LineLeader::getWhiteLimit ()
+
+

get the limit at which white changes to black

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::invertLineColorToWhite ()
+
+

Color inversion (White line on a black background)

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_LineLeader::issueCommand (char command)
+
+

write a command byte to the command register of the device

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::resetColorInversion ()
+
+

Reset Color inversion (black line on a white background, this is also the default).

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKd (uint8_t kd)
+
+

set the derivative factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKdFactor (uint8_t kdfact)
+
+

Set the Kd factor

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKi (uint8_t ki)
+
+

set the integral factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKiFactor (uint8_t kifact)
+
+

Set the Ki factor

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKp (uint8_t kp)
+
+

set the proportion factor for PID control

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setKpFactor (uint8_t kpfact)
+
+

Set the Kp factor

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_LineLeader::setSetPoint (uint8_t spoint)
+
+

set the desired point relative to the 8 sensors for PID control

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::sleep ()
+
+

turn off the LEDs on the device and put it in the sleep state

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::takeSnapshot ()
+
+

Take a snapshot, this command looks at the line under the sensor and stores the width and position of the line in sensor’s memory. Subsequently, sensor will use these characteristics of line to track it. This command inverts the colors if it sees a white line on black background. (PID parameters are not affected).

+ +
+
+ +
+
+ + + + + + + +
bool EVs_LineLeader::wakeUp ()
+
+

turn on the LEDs and wake up the device

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___line_leader.js b/html/class_e_vs___line_leader.js new file mode 100644 index 0000000..8671a97 --- /dev/null +++ b/html/class_e_vs___line_leader.js @@ -0,0 +1,38 @@ +var class_e_vs___line_leader = +[ + [ "EVs_LineLeader", "class_e_vs___line_leader.html#a9970850b5cf09ac5700858f3d9a58819", null ], + [ "calibrateBlack", "class_e_vs___line_leader.html#a9d06871514925b3a5234ed2f4b0096c1", null ], + [ "calibrateWhite", "class_e_vs___line_leader.html#a2de52bc644f1f7f0660603da6b6d2ce0", null ], + [ "configureEurope", "class_e_vs___line_leader.html#af8eb5d439927cec77291e05edb87b4b6", null ], + [ "configureUniversal", "class_e_vs___line_leader.html#aabf417c1815a5387e85f1236fcdaf2c4", null ], + [ "configureUS", "class_e_vs___line_leader.html#a20f35d3a8b9c47da77263cd8df524b1f", null ], + [ "getAverage", "class_e_vs___line_leader.html#adbc402354b8d5c028d6e3a82c831d1c7", null ], + [ "getBlackCalibration", "class_e_vs___line_leader.html#a241ede4d80a7560e853bcbb280da6614", null ], + [ "getBlackLimit", "class_e_vs___line_leader.html#a21d3f9a744985ad3e5c670e6e967a2cd", null ], + [ "getKd", "class_e_vs___line_leader.html#a403b278c736799614f8e7400f614be0a", null ], + [ "getKdFactor", "class_e_vs___line_leader.html#a6be11c8ae2aea84bb60318f413693a04", null ], + [ "getKi", "class_e_vs___line_leader.html#a95e891ad63ba41a17c881797d9bb0b33", null ], + [ "getKiFactor", "class_e_vs___line_leader.html#afdc091cedb94784322a4f8e250bf82aa", null ], + [ "getKp", "class_e_vs___line_leader.html#ad5ccfdd0cd8936ab9d9aa59bbd81806f", null ], + [ "getKpFactor", "class_e_vs___line_leader.html#ad386dbffe128a47de15754adc993ef1b", null ], + [ "getRawCalibrated", "class_e_vs___line_leader.html#a6f687a069c476486f19a059710251cbf", null ], + [ "getRawUncalibrated", "class_e_vs___line_leader.html#ac7f91f70e4be740af25029df8a9af81c", null ], + [ "getResult", "class_e_vs___line_leader.html#a3610f52eff0efe406c6f8a80bea902f9", null ], + [ "getSetPoint", "class_e_vs___line_leader.html#abfc74114af397d4690667834c16e7db8", null ], + [ "getSteering", "class_e_vs___line_leader.html#a8e56c26a870950dce2bd8dcdf626c423", null ], + [ "getWhiteCalibration", "class_e_vs___line_leader.html#a15b1b1a82dfda8ed4968bb4bfc6bf30e", null ], + [ "getWhiteLimit", "class_e_vs___line_leader.html#a5056fc5543c29dfe1bf851603320134d", null ], + [ "invertLineColorToWhite", "class_e_vs___line_leader.html#afb31e30c4e982d05a188618fd95ac814", null ], + [ "issueCommand", "class_e_vs___line_leader.html#a811c32b94db2cc7537370e6c897754b6", null ], + [ "resetColorInversion", "class_e_vs___line_leader.html#adab53aceac2b87e08740efeb0e7b2b79", null ], + [ "setKd", "class_e_vs___line_leader.html#a777108c1efd12acdd44854cde3861331", null ], + [ "setKdFactor", "class_e_vs___line_leader.html#ada6be39969422cab48f8911a6ca6f764", null ], + [ "setKi", "class_e_vs___line_leader.html#a84f3bda62a30783a89e667956d03eecf", null ], + [ "setKiFactor", "class_e_vs___line_leader.html#aa4762eb840e177ea6c5cb9a4c9cdea72", null ], + [ "setKp", "class_e_vs___line_leader.html#af9139b98564eab961047feffc0844c09", null ], + [ "setKpFactor", "class_e_vs___line_leader.html#af203e002020665991443b552434d17c0", null ], + [ "setSetPoint", "class_e_vs___line_leader.html#aa85da1c90a7db5435ef208527702b168", null ], + [ "sleep", "class_e_vs___line_leader.html#a5ec16046f6319d10b5cb9b8d7089ac49", null ], + [ "takeSnapshot", "class_e_vs___line_leader.html#a1567cef4ce6db5161de66914fd4c0331", null ], + [ "wakeUp", "class_e_vs___line_leader.html#a6065b8875ffc1bbe6488801fae99cabb", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___line_leader.png b/html/class_e_vs___line_leader.png new file mode 100644 index 0000000000000000000000000000000000000000..81aec07c6766b15658778fcb8a33d1f4fafb4dc8 GIT binary patch literal 1046 zcmeAS@N?(olHy`uVBq!ia0vp^_kg&AgBeKf&s&-gq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ0mwLK5hEy=Vo%?#yW*q^x+wEHK|4-U~ zgqcsnv+VGvru$3Y2oxxpw13oBY`MVpNWDeimcxW4ViC5US&gqfgLq^7C$0Kqe`)qS zdCy%BZtlB(_Yl{^rRsYwou2n)h0UsMr=OgxbpIr+nR{o;!Dj z-r}vAb?djEz4gL+M<#Hd7ujpgHG4KA1qxLrY#Xi+0e?24cc>c5pSH61b&$Kmu zkz5^Z~o2T0x%9ESzS6}+g?xJ^j!pAqBo31~-dHYk?G|RVdzw8x19sKIA zPVuqt^E?mU=12;^8FEWeZD#PKoonW){8h|9H%}$>_*a#cZ0poLLkn#^SAha6^xb-K zCk|hODqv8uG|V?P~9T-H6Kz~VIpS-r$ zWs|Lp3oOr8m4d90I{*%XZE@e9YzzCm@QtHGk!X8O;p6+SRIfJ4IUFjeI^DlCDL%yg z!j`S;-*2?g-1bp&D a|6`sm + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_MagicWand Member List
+
+
+ +

This is the complete list of members for EVs_MagicWand, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_MagicWand(uint8_t devAddr=0x70)EVs_MagicWand
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
lightWand(uint8_t byteToWrite)EVs_MagicWand
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___magic_wand.html b/html/class_e_vs___magic_wand.html new file mode 100644 index 0000000..894cc01 --- /dev/null +++ b/html/class_e_vs___magic_wand.html @@ -0,0 +1,339 @@ + + + + + + +EVShield: EVs_MagicWand Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_MagicWand Class Reference
+
+
+ +

This class interfaces with Magic Wand attached to EVShield. + More...

+ +

#include <EVs_MagicWand.h>

+
+Inheritance diagram for EVs_MagicWand:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_MagicWand (uint8_t devAddr=0x70)
 
void lightWand (uint8_t byteToWrite)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with Magic Wand attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_MagicWand::EVs_MagicWand (uint8_t devAddr = 0x70)
+
+

class constructor for the MagicWand; the i2c address for this device cannot be changed

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
void EVs_MagicWand::lightWand (uint8_t byteToWrite)
+
+

light the want; each bit of the byteToWrite represents one LED; 0 is on and 1 is off

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___magic_wand.js b/html/class_e_vs___magic_wand.js new file mode 100644 index 0000000..175d792 --- /dev/null +++ b/html/class_e_vs___magic_wand.js @@ -0,0 +1,5 @@ +var class_e_vs___magic_wand = +[ + [ "EVs_MagicWand", "class_e_vs___magic_wand.html#a7a6967a2dfab86b8688eef028937f874", null ], + [ "lightWand", "class_e_vs___magic_wand.html#ace4bac0ea88db1efd97f85ad8d9a86e5", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___magic_wand.png b/html/class_e_vs___magic_wand.png new file mode 100644 index 0000000000000000000000000000000000000000..2b23d473fc408e3b7cae25882bf1f52e06c8ed68 GIT binary patch literal 1070 zcmeAS@N?(olHy`uVBq!ia0vp^Pk^|CgBeI3*uQ-qkdg@S332`Z|38rV;?396{zDUh zEHFNB-~emq9eE&^qa?^Lm;tB=1g@S6F=Aj~-s|b&7*fIbcJAv*s}%&;Zue{5|3A@R zNRaJHPFcUiQO}!(lLD9R?5XEeY&on@>%{TUfMZgLKv>WuzC)_2nc*=(lWr9_pM3ap z;u6t$Z$Ixh%u%j+&G}w+b-Jyd-1KdiAKfgKzg?@RdjH7z*jXFOA5Plxpf}~~nj5_@ zO?J+{{NMA~#o7CP-8V)H9GT0!OpPY9dEu|HTWChY2>P#R$A?UE%wRRFAGy_RqVy)9nFe(dBx+Jr`T-I zAiHhTv!$kF%zGa{an9q@k`W=x=C68vt77WhbCY*^TvAh9X>m{Qy3xa=x@pFl$14SY zRz9rUuHkjk>g3u(zfapn+8onUi!S=VL*0I&&h;nH=1p1B)N3oL9UU6`_Wsjqqq*Ww ze_nny>)zyL0mo&6(yvaqrPBRMYo&#kr)Snl|LUMgQV%9g+M=ze>6u&L>3K_Z`jjPR zcU+BH1o{qnvzXi7uu&h{r3eUHT%b}&u%6nU_Ihl&F~c6?wb2QbDMey}-$Vu~^9 zAKj7!&w?)sEWY%2Qb@7h$wxM~)n2DQ`EuQcr+ABs=$xQU zKEF%-gl8@P_EGuw`rae1D(c%`hMbAAIki;RbM>4e|66n3mg;7PfBBmBX{TN8>Ok+M zCq16soU%mq`Lr#q>Z^0NdtTyFpSor8=8Ybo=jn8P`nme`9`&<*YrZ{+D)lXoePpZY zsSET`*p4MCZ#%p}zE#b1j}clRs@PH>!Eim1<;7fUkG{veI`0*J7QDItNo-PFEaR^O zs*F`6;B!X}cn&8r)HEwwmx1h3InW0TF72e_#b0OZz0P^|+I8B_hd;B~79_l5c_1C~ zH{avfGxNwePb2lL-Zd#TcWw7QKH|^Iy78#nydWdpyDJUTa{qU)-o58w+|p^4d(LfA zzdn8L#Gda{qKbXGG@Sj+Cu?3z+IcI}hczpB6QAY!lu)bmlSZYxSA5R1`|tCNY4@+X z8+Rt>tN3qM_dWgV_d`iD)wqyw>(pS6eGhevIX^_#)xNe=UH&tc`)191=A6QvGh@ox xZ#?TdE&3oF + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTCam Member List
+
+
+ +

This is the complete list of members for EVs_NXTCam, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
camFirmware()EVs_NXTCam
checkAddress() (defined in EVShieldI2C)EVShieldI2C
disableTracking()EVs_NXTCam
enableTracking()EVs_NXTCam
EVs_NXTCam(uint8_t i2c_address=0x02)EVs_NXTCam
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getBlobs(int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom)EVs_NXTCam
getColorMap()EVs_NXTCam
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getNumberObjects()EVs_NXTCam
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
illuminationOff()EVs_NXTCam
illuminationOn()EVs_NXTCam
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_NXTCam
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
pingCam()EVs_NXTCam
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readImageRegisters()EVs_NXTCam
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
resetCam()EVs_NXTCam
restart(uint8_t addressRW)SoftI2cMaster
selectLineMode()EVs_NXTCam
selectObjectMode()EVs_NXTCam
sendColorMap()EVs_NXTCam
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
sortColor()EVs_NXTCam
sortNone()EVs_NXTCam
sortSize()EVs_NXTCam
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeImageRegisters()EVs_NXTCam
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___n_x_t_cam.html b/html/class_e_vs___n_x_t_cam.html new file mode 100644 index 0000000..6721e22 --- /dev/null +++ b/html/class_e_vs___n_x_t_cam.html @@ -0,0 +1,710 @@ + + + + + + +EVShield: EVs_NXTCam Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTCam Class Reference
+
+
+ +

This class interfaces with NXTCam attached to EVShield. + More...

+ +

#include <EVs_NXTCam.h>

+
+Inheritance diagram for EVs_NXTCam:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_NXTCam (uint8_t i2c_address=0x02)
 
uint8_t issueCommand (char command)
 
bool sortSize ()
 
bool selectObjectMode ()
 
bool writeImageRegisters ()
 
bool disableTracking ()
 
bool enableTracking ()
 
bool getColorMap ()
 
bool illuminationOn ()
 
bool readImageRegisters ()
 
bool selectLineMode ()
 
bool pingCam ()
 
bool resetCam ()
 
bool sendColorMap ()
 
bool illuminationOff ()
 
bool sortColor ()
 
bool sortNone ()
 
bool camFirmware ()
 
int getNumberObjects ()
 
void getBlobs (int *nblobs, uint8_t *color, uint8_t *left, uint8_t *top, uint8_t *right, uint8_t *bottom)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with NXTCam attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_NXTCam::EVs_NXTCam (uint8_t i2c_address = 0x02)
+
+

class constructor for NXTCam with optional custom i2c address parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_NXTCam::camFirmware ()
+
+

get the firmware of the NXTCam

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::disableTracking ()
+
+

disable tracking for the NXTCam

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::enableTracking ()
+
+

enable tracking for the NXTCam

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTCam::getBlobs (int * nblobs,
uint8_t * color,
uint8_t * left,
uint8_t * top,
uint8_t * right,
uint8_t * bottom 
)
+
+

This function gets the blob information of all the blobs that NXTCam is tracking. There could be upto 8 blobs being tracked by NXTCam. All the parameters of this function are return values. This function will return color and coordinate information for all the blobs.

+
Parameters
+ + + + + + + +
nblobsIn this variable, number of blobs NXTCam sees are returned. The blobs NXTCam sees could be of different color or same color. For e.g. if you have 3 colors defined, say red (color 1), blue (color 2) and green (color3), and you have 3 red objects and 2 blue objects and 1 green object in front of NXTCam, nblobs will be 6. color[]: a array of colors for the blobs in above example, Color array will have 6 valid elements - three bytes will say 1 (for color1), and 2 bytes will say (for color 2), and 1 byte will say 3 (for color 3). Based on sorting chosen, they will be sorted by size or color (if the sorting was color, first 3 bytes will be 1, next two will be 2 and next one will be 3).
colora array of colors for the blobs (array has 8 elements)
leftthe coordinate values of the blobs (array of 8 elements)
topthe coordinate values of the blobs (array of 8 elements)
rightthe coordinate values of the blobs (array of 8 elements)
bottomthe coordinate values of the blobs (array of 8 elements)
+
+
+
Returns
look at the nblobs first to see how many blobs are being tracked, and then read the respective color and coordinate infromation.
+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::getColorMap ()
+
+

get the current colormap of the NXTCam

+ +
+
+ +
+
+ + + + + + + +
int EVs_NXTCam::getNumberObjects ()
+
+

get the total number of objected tracked by the NXTCam

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::illuminationOff ()
+
+

not impmemented yet

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::illuminationOn ()
+
+

not impmemented yet

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTCam::issueCommand (char command)
+
+

issue character command byte to the command register of the NXTCam (command such as enable tracking, stop tracking, etc). Refer to User Guide for available commands.

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::pingCam ()
+
+

ping the NXTCam to test connection

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::readImageRegisters ()
+
+

read the image registers of the CCD

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::resetCam ()
+
+

reset the NXTCam

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::selectLineMode ()
+
+

put the NXTCam in line tracking mode

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::selectObjectMode ()
+
+

configure the tracking mode of the device to object tracking

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::sendColorMap ()
+
+

send ColorMap to the NXTCam

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::sortColor ()
+
+

sort the blobs by color

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::sortNone ()
+
+

clear any selected sort configuration

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::sortSize ()
+
+

sort the blobs from the NXTCam byt blobs

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTCam::writeImageRegisters ()
+
+

write to the image registers of the CCD

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_cam.js b/html/class_e_vs___n_x_t_cam.js new file mode 100644 index 0000000..a81f0d2 --- /dev/null +++ b/html/class_e_vs___n_x_t_cam.js @@ -0,0 +1,23 @@ +var class_e_vs___n_x_t_cam = +[ + [ "EVs_NXTCam", "class_e_vs___n_x_t_cam.html#aef17dec180b4cd497006e3a407f3dfb2", null ], + [ "camFirmware", "class_e_vs___n_x_t_cam.html#a8b54a7019c9a3705be91ca19d430dc1b", null ], + [ "disableTracking", "class_e_vs___n_x_t_cam.html#ad5ea1ffeb0bbb280523a1d0519f95530", null ], + [ "enableTracking", "class_e_vs___n_x_t_cam.html#afd065d6c8b8f86d5cd086e6d4bea2716", null ], + [ "getBlobs", "class_e_vs___n_x_t_cam.html#aceded2fa0ae230aa34e69118fba6207b", null ], + [ "getColorMap", "class_e_vs___n_x_t_cam.html#a9c59a581ed1345dcb3fbf2c8c26011c0", null ], + [ "getNumberObjects", "class_e_vs___n_x_t_cam.html#a64ceea0eed6ec3959e8974954a751f57", null ], + [ "illuminationOff", "class_e_vs___n_x_t_cam.html#ab6ee45b11e704167e4af14c18caffe58", null ], + [ "illuminationOn", "class_e_vs___n_x_t_cam.html#aaa956625ec5e2510f7536c74637c09e2", null ], + [ "issueCommand", "class_e_vs___n_x_t_cam.html#a450eb967d4247fe4fc0dbb296c429051", null ], + [ "pingCam", "class_e_vs___n_x_t_cam.html#a3430404c0f1c519b242604231f8bf94d", null ], + [ "readImageRegisters", "class_e_vs___n_x_t_cam.html#ad2924a64e8fc0f24c586babe5ee97a8c", null ], + [ "resetCam", "class_e_vs___n_x_t_cam.html#aed10d71057c7df1846f0bf7547d6adc5", null ], + [ "selectLineMode", "class_e_vs___n_x_t_cam.html#a9adfdcc6bd793e30edff85106906e1f5", null ], + [ "selectObjectMode", "class_e_vs___n_x_t_cam.html#ad7c8c3b9cd5c05a02cb718cac7904aaa", null ], + [ "sendColorMap", "class_e_vs___n_x_t_cam.html#a53890c2c2aea47e19cc0cc4722c93d26", null ], + [ "sortColor", "class_e_vs___n_x_t_cam.html#adda269f97a9ca452ababa385316f7f58", null ], + [ "sortNone", "class_e_vs___n_x_t_cam.html#afda499b6dc88980d1cd741cc6e3c0304", null ], + [ "sortSize", "class_e_vs___n_x_t_cam.html#a00b94a57cc34ec38b2b477b28526bd3d", null ], + [ "writeImageRegisters", "class_e_vs___n_x_t_cam.html#af2fad6bb94fb103d8b294c13cf60e469", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_cam.png b/html/class_e_vs___n_x_t_cam.png new file mode 100644 index 0000000000000000000000000000000000000000..94486651aa25c03e1378b8ae4002fde203ae8c07 GIT binary patch literal 1009 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*r=ez!;H@8g?3xd zGX1!0e8nbbdz)_U@^csbTW-~Et#0f4-##tsa;RnX?!WR{*F$I8tSfq2e`3nX)F(zR z=9y+&mz~Px^t|LMGe^<$SFDrABtIdiNhV$#o|im<9Jk6v0bZK1-Gaby%VxAV&Ql;> z&hyP=VdcJyFZvG7Q~M(I$ZoMUTlJiP5X*)_CyoayiYx|R9E@{RS{U3o6&oho_-D*} z{?m*h=8?H^1EUki0b@m$2QvkjKKO7jR;aZw*a$l@%mXTv_5?-@TTW#?a){{0sfHEsRZOC~yjPb)pY{XOn<)^xV$;nFAH!@|y8{MT|z#QyrG zfYOt3@vB}>+v>b<{qgUY)*Snkw|%+F*B=(nX7;~#i*MR}={win?=x~urIzMMEZpTa z>BF^pzhl zNHm=|66OF?O>m3A0SnEgC58-rGa2U{x!m&XXQG?GaMe$n(=Q600-rL}K)l6pzD1xR z9jC8h(huC0WzN!LdtkRtUJvMLU~qsfDBTe=X`gPb)Kb&>m8x&#r@na)Od5^9{yqD1 za(}m`IfL1c;)Sy|&i!$HQVzGN_Z;T6E%FQ1Hfn9DiRFCiesA~1s6Rg?Urk$hZ0))0 zRhy@3h&$cQ`Vzfv%lkDKf@EyCzn0%F-m?9v4A)oFU263qPycW}H4c&bt$SU5vCy_F zU;GU}D6o@?3n`dj^^E>R{4^%e#{K~UTX9MF6xHfvetF0ls2f6Rw + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTColor Member List
+
+
+ +

This is the complete list of members for EVs_NXTColor, including all inherited members.

+ + + + + + + + + + +
EVs_NXTColor()EVs_NXTColor
EVs_NXTColor(EVShield *shield, SH_BankPort bp)EVs_NXTColor
init(EVShield *shield, SH_BankPort bp)EVs_NXTColor
m_bpEVs_NXTColor
m_offsetEVs_NXTColor
mp_shieldEVs_NXTColor
readColor() (defined in EVs_NXTColor)EVs_NXTColor
readValue() (defined in EVs_NXTColor)EVs_NXTColor
setType(uint8_t type)EVs_NXTColor
+
+ + + + diff --git a/html/class_e_vs___n_x_t_color.html b/html/class_e_vs___n_x_t_color.html new file mode 100644 index 0000000..7fdba98 --- /dev/null +++ b/html/class_e_vs___n_x_t_color.html @@ -0,0 +1,295 @@ + + + + + + +EVShield: EVs_NXTColor Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTColor Class Reference
+
+
+ +

EVShield Analog Sensor class. + More...

+ +

#include <EVs_NXTColor.h>

+ + + + + + + + + + + + + + +

+Public Member Functions

 EVs_NXTColor ()
 
 EVs_NXTColor (EVShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
bool init (EVShield *shield, SH_BankPort bp)
 
+uint8_t readValue ()
 
+uint8_t readColor ()
 
+ + + + + + + +

+Public Attributes

EVShieldmp_shield
 
SH_BankPort m_bp
 
int m_offset
 
+

Detailed Description

+

EVShield Analog Sensor class.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + +
EVs_NXTColor::EVs_NXTColor ()
+
+

null constructor for the class; need to init later

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
EVs_NXTColor::EVs_NXTColor (EVShieldshield,
SH_BankPort bp 
)
+
+

class constructor with pointer to EVShield and the bankport as a parameter; if object is instantiated using this constructor, init is not needed

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTColor::init (EVShieldshield,
SH_BankPort bp 
)
+
+

read the raw analog value from the device and return as an integer initialize the analog device with a pointer to the EVShield and the bank port it is connected to

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTColor::setType (uint8_t type)
+
+

set the type of the device on this port of the EVShield

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
SH_BankPort EVs_NXTColor::m_bp
+
+

bank port the device is connected to

+ +
+
+ +
+
+ + + + +
int EVs_NXTColor::m_offset
+
+

the data for uart sensors is stored in the bank, and there is a offset based on port

+ +
+
+ +
+
+ + + + +
EVShield* EVs_NXTColor::mp_shield
+
+

pointer to the EVShield class instantiation used

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_color.js b/html/class_e_vs___n_x_t_color.js new file mode 100644 index 0000000..391b4a0 --- /dev/null +++ b/html/class_e_vs___n_x_t_color.js @@ -0,0 +1,12 @@ +var class_e_vs___n_x_t_color = +[ + [ "EVs_NXTColor", "class_e_vs___n_x_t_color.html#ac5fcdd8ad554c757f690471d193a19d2", null ], + [ "EVs_NXTColor", "class_e_vs___n_x_t_color.html#a3c8e2c6d1c6e4f7f9288599b904a42f7", null ], + [ "init", "class_e_vs___n_x_t_color.html#a6de7b2aa93f12c530d98682bffadc2fc", null ], + [ "readColor", "class_e_vs___n_x_t_color.html#a4d906fbbc4491047bdb1d2be33a694d7", null ], + [ "readValue", "class_e_vs___n_x_t_color.html#a02d02da4e8b8efa395b3a11672db4338", null ], + [ "setType", "class_e_vs___n_x_t_color.html#a80d7b140edabae6e28f1f90bad5412b6", null ], + [ "m_bp", "class_e_vs___n_x_t_color.html#ab34dffd1adcf5d5927af77eb05817aa6", null ], + [ "m_offset", "class_e_vs___n_x_t_color.html#a56694c134627e81c05e20a79cb278d98", null ], + [ "mp_shield", "class_e_vs___n_x_t_color.html#aeec6cf64ecfdaf9b0743afa5e3e6ba64", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_light-members.html b/html/class_e_vs___n_x_t_light-members.html new file mode 100644 index 0000000..519f9d3 --- /dev/null +++ b/html/class_e_vs___n_x_t_light-members.html @@ -0,0 +1,135 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTLight Member List
+
+
+ +

This is the complete list of members for EVs_NXTLight, including all inherited members.

+ + + + + + + + + + +
EVShieldAGS()EVShieldAGS
EVShieldAGS(EVShield *shield, SH_BankPort bp)EVShieldAGS
init(EVShield *shield, SH_BankPort bp)EVs_NXTLight
m_bpEVShieldAGS
mp_shieldEVShieldAGS
readRaw()EVShieldAGS
setAmbient()EVs_NXTLight
setReflected()EVs_NXTLight
setType(uint8_t type)EVShieldAGS
+
+ + + + diff --git a/html/class_e_vs___n_x_t_light.html b/html/class_e_vs___n_x_t_light.html new file mode 100644 index 0000000..2c6cb76 --- /dev/null +++ b/html/class_e_vs___n_x_t_light.html @@ -0,0 +1,237 @@ + + + + + + +EVShield: EVs_NXTLight Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTLight Class Reference
+
+
+ +

This class interfaces with LEGO Light sensor attached to EVShield. + More...

+ +

#include <EVs_NXTLight.h>

+
+Inheritance diagram for EVs_NXTLight:
+
+
+ + +EVShieldAGS + +
+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
bool setReflected ()
 
bool setAmbient ()
 
- Public Member Functions inherited from EVShieldAGS
 EVShieldAGS ()
 
 EVShieldAGS (EVShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
int readRaw ()
 
bool init (EVShield *shield, SH_BankPort bp)
 
+ + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldAGS
EVShieldmp_shield
 
SH_BankPort m_bp
 
+

Detailed Description

+

This class interfaces with LEGO Light sensor attached to EVShield.

+

Note, the light sensor does not work on BAS1.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTLight::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the NXTLight sensor with a pointer to the EVShield and the bank port it is connected to

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTLight::setAmbient ()
+
+

set the NXTLight sensor mode to ambient light mode (internal LED will be turned off)

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTLight::setReflected ()
+
+

set the NXTLight sensor mode to reflected light mode (internal LED will be turned on)

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_light.js b/html/class_e_vs___n_x_t_light.js new file mode 100644 index 0000000..c1dba66 --- /dev/null +++ b/html/class_e_vs___n_x_t_light.js @@ -0,0 +1,6 @@ +var class_e_vs___n_x_t_light = +[ + [ "init", "class_e_vs___n_x_t_light.html#a99471c0dfe5d9576898ce7e555cfb6eb", null ], + [ "setAmbient", "class_e_vs___n_x_t_light.html#a31217ed4911d1f5acf8446c110400a36", null ], + [ "setReflected", "class_e_vs___n_x_t_light.html#a3dc2f6b839e5d5d62c1958bc0f45df27", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_light.png b/html/class_e_vs___n_x_t_light.png new file mode 100644 index 0000000000000000000000000000000000000000..855348a0b69c70fd983bcbae7830d69c88e6a856 GIT binary patch literal 509 zcmVvTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d0004uNklX^!*=syE7{I!%Vsv6QI}qoJD1;x^Vbfc$9YaHzT3P`&WJy$=g_`7 zQ%`;7tb;}F?Q;7*;w6dnGT~fA-|}hFSp%-cH%L?dzI-=$TP=l-w$$HAbIv(T0I%o)5T{uD;}Ob_#Xsqh z{9yc-ch1HGc-nXXM;i~|XyXAKZ9IUZjR$bF@c@qg7e1ww;zR<7(#8Wg`V_tty1b4) zo3&1c#?bY>VOrqe55w=HsywH&-{5usiL}dn{9!#7{T}Sd#SOk?qQ?(AbbdgK7SWg7 z4zli=N{MZkD{{M_0yHHVg_}bW4x!0e3k4iSTrFKs9^!8i3 zxCNK^dN~1ZGtOW9 literal 0 HcmV?d00001 diff --git a/html/class_e_vs___n_x_t_m_m_x-members.html b/html/class_e_vs___n_x_t_m_m_x-members.html new file mode 100644 index 0000000..6183b6b --- /dev/null +++ b/html/class_e_vs___n_x_t_m_m_x-members.html @@ -0,0 +1,200 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTMMX Member List
+
+
+ +

This is the complete list of members for EVs_NXTMMX, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_NXTMMX(uint8_t i2c_address=0x06)EVs_NXTMMX
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getBatteryVoltage()EVs_NXTMMX
getCommandRegA(uint8_t which_motor) (defined in EVs_NXTMMX)EVs_NXTMMX
getCommandRegB(uint8_t which_motor) (defined in EVs_NXTMMX)EVs_NXTMMX
getDeviceID()EVShieldI2C
getEncoderPosition(uint8_t which_motor)EVs_NXTMMX
getEncoderTarget(uint8_t which_motor)EVs_NXTMMX
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getMotorStatusByte(uint8_t which_motor)EVs_NXTMMX
getMotorTasksRunningByte(uint8_t which_motor)EVs_NXTMMX
getSpeed(uint8_t which_motor)EVs_NXTMMX
getTimeToRun(uint8_t which_motor, int seconds)EVs_NXTMMX
getTimeToRun(uint8_t which_motor)EVs_NXTMMX
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_NXTMMX
isTachoDone(uint8_t which_motors)EVs_NXTMMX
isTimeDone(uint8_t which_motors)EVs_NXTMMX
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
reset()EVs_NXTMMX
resetEncoder(uint8_t which_motor)EVs_NXTMMX
restart(uint8_t addressRW)SoftI2cMaster
runDegrees(uint8_t which_motors, uint8_t direction, int speed, long degrees, uint8_t wait_for_completion, uint8_t next_action)EVs_NXTMMX
runRotations(uint8_t which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action)EVs_NXTMMX
runSeconds(uint8_t which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action)EVs_NXTMMX
runTachometer(uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action)EVs_NXTMMX
runUnlimited(uint8_t which_motors, uint8_t direction, int speed)EVs_NXTMMX
setAddress(uint8_t address)EVShieldI2C
setCommandRegA(uint8_t which_motor, uint8_t value) (defined in EVs_NXTMMX)EVs_NXTMMX
setCommandRegB(uint8_t which_motor, uint8_t value) (defined in EVs_NXTMMX)EVs_NXTMMX
setEncoderPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVs_NXTMMX
setEncoderSpeedTimeAndControl(uint8_t which_motors, long encoder, int speed, uint8_t duration, uint8_t control)EVs_NXTMMX
setEncoderTarget(uint8_t which_motor, long target)EVs_NXTMMX
setPassCount(uint8_t pass_count)EVs_NXTMMX
setSpeed(uint8_t which_motor, int speed)EVs_NXTMMX
setSpeedPID(uint16_t Kp, uint16_t Ki, uint16_t Kd)EVs_NXTMMX
setSpeedTimeAndControl(uint8_t which_motors, int speed, uint8_t duration, uint8_t control)EVs_NXTMMX
setTolerance(uint8_t tolerance)EVs_NXTMMX
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
startMotorsInSync()EVs_NXTMMX
stop(uint8_t which_motors, uint8_t next_action)EVs_NXTMMX
EVShieldI2C::stop(void)SoftI2cMaster
waitUntilTachoDone(uint8_t which_motors)EVs_NXTMMX
waitUntilTimeDone(uint8_t which_motors)EVs_NXTMMX
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___n_x_t_m_m_x.html b/html/class_e_vs___n_x_t_m_m_x.html new file mode 100644 index 0000000..f193af5 --- /dev/null +++ b/html/class_e_vs___n_x_t_m_m_x.html @@ -0,0 +1,1179 @@ + + + + + + +EVShield: EVs_NXTMMX Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTMMX Class Reference
+
+
+ +

This class interfaces with NXTMMX attached to EVShield. + More...

+ +

#include <EVs_NXTMMX.h>

+
+Inheritance diagram for EVs_NXTMMX:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_NXTMMX (uint8_t i2c_address=0x06)
 
uint8_t getBatteryVoltage ()
 
uint8_t issueCommand (char command)
 
bool setEncoderTarget (uint8_t which_motor, long target)
 
long getEncoderTarget (uint8_t which_motor)
 
bool setSpeed (uint8_t which_motor, int speed)
 
int8_t getSpeed (uint8_t which_motor)
 
bool getTimeToRun (uint8_t which_motor, int seconds)
 
uint8_t getTimeToRun (uint8_t which_motor)
 
+bool setCommandRegB (uint8_t which_motor, uint8_t value)
 
+uint8_t getCommandRegB (uint8_t which_motor)
 
+bool setCommandRegA (uint8_t which_motor, uint8_t value)
 
+uint8_t getCommandRegA (uint8_t which_motor)
 
int32_t getEncoderPosition (uint8_t which_motor)
 
uint8_t getMotorStatusByte (uint8_t which_motor)
 
uint8_t getMotorTasksRunningByte (uint8_t which_motor)
 
bool setEncoderPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
bool setSpeedPID (uint16_t Kp, uint16_t Ki, uint16_t Kd)
 
bool setPassCount (uint8_t pass_count)
 
bool setTolerance (uint8_t tolerance)
 
bool reset ()
 
bool startMotorsInSync ()
 
bool resetEncoder (uint8_t which_motor)
 
bool setSpeedTimeAndControl (uint8_t which_motors, int speed, uint8_t duration, uint8_t control)
 
bool setEncoderSpeedTimeAndControl (uint8_t which_motors, long encoder, int speed, uint8_t duration, uint8_t control)
 
bool isTimeDone (uint8_t which_motors)
 
void waitUntilTimeDone (uint8_t which_motors)
 
bool isTachoDone (uint8_t which_motors)
 
void waitUntilTachoDone (uint8_t which_motors)
 
void runUnlimited (uint8_t which_motors, uint8_t direction, int speed)
 
void runSeconds (uint8_t which_motors, uint8_t direction, int speed, uint8_t duration, uint8_t wait_for_completion, uint8_t next_action)
 
void runTachometer (uint8_t which_motors, uint8_t direction, int speed, long tachometer, uint8_t relative, uint8_t wait_for_completion, uint8_t next_action)
 
void runDegrees (uint8_t which_motors, uint8_t direction, int speed, long degrees, uint8_t wait_for_completion, uint8_t next_action)
 
void runRotations (uint8_t which_motors, uint8_t direction, int speed, long rotations, uint8_t wait_for_completion, uint8_t next_action)
 
bool stop (uint8_t which_motors, uint8_t next_action)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with NXTMMX attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_NXTMMX::EVs_NXTMMX (uint8_t i2c_address = 0x06)
+
+

constructor for NXTMMX

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
uint8_t EVs_NXTMMX::getBatteryVoltage ()
+
+

get the battery voltage for the MMX

+ +
+
+ +
+
+ + + + + + + + +
int32_t EVs_NXTMMX::getEncoderPosition (uint8_t which_motor)
+
+

get the current encoder position of the motor in degrees

+ +
+
+ +
+
+ + + + + + + + +
long EVs_NXTMMX::getEncoderTarget (uint8_t which_motor)
+
+

get the target encoder position for the motor

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTMMX::getMotorStatusByte (uint8_t which_motor)
+
+

get the current status of the motor

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTMMX::getMotorTasksRunningByte (uint8_t which_motor)
+
+

get the tasks that are running on the specific motor

+ +
+
+ +
+
+ + + + + + + + +
int8_t EVs_NXTMMX::getSpeed (uint8_t which_motor)
+
+

get the speed of the motor

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::getTimeToRun (uint8_t which_motor,
int seconds 
)
+
+

set the time in seconds for which the motor should run for

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTMMX::getTimeToRun (uint8_t which_motor)
+
+

get the time in seconds that the motor is running for

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTMMX::issueCommand (char command)
+
+

issue a command to this bank of the NXTMMX

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTMMX::isTachoDone (uint8_t which_motors)
+
+

validate if the motor has reached its set target tachometer position

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTMMX::isTimeDone (uint8_t which_motors)
+
+

validate if the motor has finished running for the set time duration

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTMMX::reset ()
+
+

reset all the set values for the motors

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTMMX::resetEncoder (uint8_t which_motor)
+
+

reset the current encoder position to zero for the motor

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTMMX::runDegrees (uint8_t which_motors,
uint8_t direction,
int speed,
long degrees,
uint8_t wait_for_completion,
uint8_t next_action 
)
+
+

run the motor for a set number of degrees and proceed to the next action

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTMMX::runRotations (uint8_t which_motors,
uint8_t direction,
int speed,
long rotations,
uint8_t wait_for_completion,
uint8_t next_action 
)
+
+

run the motor for a set number of complete rotations and proceed to the next action

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTMMX::runSeconds (uint8_t which_motors,
uint8_t direction,
int speed,
uint8_t duration,
uint8_t wait_for_completion,
uint8_t next_action 
)
+
+

run the motor for a set duration at a set speed and do the next action

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTMMX::runTachometer (uint8_t which_motors,
uint8_t direction,
int speed,
long tachometer,
uint8_t relative,
uint8_t wait_for_completion,
uint8_t next_action 
)
+
+

run until the tachometer target has been reached and do next action

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTMMX::runUnlimited (uint8_t which_motors,
uint8_t direction,
int speed 
)
+
+

run the motor endlessly at the desired speed in the desired direction

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setEncoderPID (uint16_t Kp,
uint16_t Ki,
uint16_t Kd 
)
+
+

set the PID control for the encoders

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setEncoderSpeedTimeAndControl (uint8_t which_motors,
long encoder,
int speed,
uint8_t duration,
uint8_t control 
)
+
+

set the ratget encoder position, speed, duration to run, and control for the motor

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setEncoderTarget (uint8_t which_motor,
long target 
)
+
+

set the target encoder position for the motor

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTMMX::setPassCount (uint8_t pass_count)
+
+

set how many times the PID controller is allowed to oscillate about the set point

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setSpeed (uint8_t which_motor,
int speed 
)
+
+

set the speed of the motor

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setSpeedPID (uint16_t Kp,
uint16_t Ki,
uint16_t Kd 
)
+
+

set the PID control for the speed of the motors

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::setSpeedTimeAndControl (uint8_t which_motors,
int speed,
uint8_t duration,
uint8_t control 
)
+
+

set the speed, duration to run, and control for the motor

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_NXTMMX::setTolerance (uint8_t tolerance)
+
+

set how far away from the set point the PID controller is allowed to oscillate (amplitude)

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTMMX::startMotorsInSync ()
+
+

start both motors at the same time to follow the set conditions

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTMMX::stop (uint8_t which_motors,
uint8_t next_action 
)
+
+

stop the motor and do an action

+ +
+
+ +
+
+ + + + + + + + +
void EVs_NXTMMX::waitUntilTachoDone (uint8_t which_motors)
+
+

wait until the motor has reached its set target tachometer position

+ +
+
+ +
+
+ + + + + + + + +
void EVs_NXTMMX::waitUntilTimeDone (uint8_t which_motors)
+
+

wait until the motor has finished running for its set respective time duration

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_m_m_x.js b/html/class_e_vs___n_x_t_m_m_x.js new file mode 100644 index 0000000..0cf71e6 --- /dev/null +++ b/html/class_e_vs___n_x_t_m_m_x.js @@ -0,0 +1,38 @@ +var class_e_vs___n_x_t_m_m_x = +[ + [ "EVs_NXTMMX", "class_e_vs___n_x_t_m_m_x.html#ac2df84b7c4e03a29ae2baeaa5bbcd238", null ], + [ "getBatteryVoltage", "class_e_vs___n_x_t_m_m_x.html#a3bed0831d9f6b7b19708d3ef06ea8469", null ], + [ "getCommandRegA", "class_e_vs___n_x_t_m_m_x.html#aa33e3be5658088eafdf950fab4862ffc", null ], + [ "getCommandRegB", "class_e_vs___n_x_t_m_m_x.html#ae00972894f298fb892e0e8eb3b4d8d12", null ], + [ "getEncoderPosition", "class_e_vs___n_x_t_m_m_x.html#af698700b7216534ef855c495b527845b", null ], + [ "getEncoderTarget", "class_e_vs___n_x_t_m_m_x.html#aead8d832bc6c08e9dfd1f3e7c3927d85", null ], + [ "getMotorStatusByte", "class_e_vs___n_x_t_m_m_x.html#a3a000f09de4a45404e738c6c72936eb4", null ], + [ "getMotorTasksRunningByte", "class_e_vs___n_x_t_m_m_x.html#aca7dca9ddfd16c3b26ca1c3888aaf27b", null ], + [ "getSpeed", "class_e_vs___n_x_t_m_m_x.html#a34b20d5115192b7f63defa3033e939e0", null ], + [ "getTimeToRun", "class_e_vs___n_x_t_m_m_x.html#afaf2cf6b6b1fbe08780ab1d5c0258c8f", null ], + [ "getTimeToRun", "class_e_vs___n_x_t_m_m_x.html#a443261fe37eb4c357a14ce9412d38557", null ], + [ "issueCommand", "class_e_vs___n_x_t_m_m_x.html#a0b948dc6413ba797d1f3f50a263cc3aa", null ], + [ "isTachoDone", "class_e_vs___n_x_t_m_m_x.html#afeb19dcc4741002f62562bbf82f21a55", null ], + [ "isTimeDone", "class_e_vs___n_x_t_m_m_x.html#a9aa56ad1966d4925b01118861bd50955", null ], + [ "reset", "class_e_vs___n_x_t_m_m_x.html#a8ff1f463c006d9e80f13f36a287a96ab", null ], + [ "resetEncoder", "class_e_vs___n_x_t_m_m_x.html#a0fc6bef019d76b6eb82fb6cbe6cc772d", null ], + [ "runDegrees", "class_e_vs___n_x_t_m_m_x.html#a3c8c7d7077dc07390c226e519f8c3549", null ], + [ "runRotations", "class_e_vs___n_x_t_m_m_x.html#a1865899534f3da4e5844bf992373f706", null ], + [ "runSeconds", "class_e_vs___n_x_t_m_m_x.html#add01b023121559d90fd9176e62b24eb8", null ], + [ "runTachometer", "class_e_vs___n_x_t_m_m_x.html#a2e0b0581c4e0ac8a574096a7485f878c", null ], + [ "runUnlimited", "class_e_vs___n_x_t_m_m_x.html#a7412eb492c9be1bca308b3f0c60af069", null ], + [ "setCommandRegA", "class_e_vs___n_x_t_m_m_x.html#a7b036edfd085c29e550520e131a34ca6", null ], + [ "setCommandRegB", "class_e_vs___n_x_t_m_m_x.html#afaac9881f8c0179d64632b11fa76008b", null ], + [ "setEncoderPID", "class_e_vs___n_x_t_m_m_x.html#aefb8b722a86556b95dbe8f4c15bb183d", null ], + [ "setEncoderSpeedTimeAndControl", "class_e_vs___n_x_t_m_m_x.html#a74c6a158c4e82ac6950795a52002f664", null ], + [ "setEncoderTarget", "class_e_vs___n_x_t_m_m_x.html#acec8a60cefa69cd41336308ab7029d8e", null ], + [ "setPassCount", "class_e_vs___n_x_t_m_m_x.html#acbbf9dd22f504603a2ee8c8c006f3a9e", null ], + [ "setSpeed", "class_e_vs___n_x_t_m_m_x.html#aef3344036875c078e838d029ecab2de0", null ], + [ "setSpeedPID", "class_e_vs___n_x_t_m_m_x.html#aa473f99258c1a9e7a511ae6998ada1e3", null ], + [ "setSpeedTimeAndControl", "class_e_vs___n_x_t_m_m_x.html#a57f0fc6b8321e55528a9923fe7b928ed", null ], + [ "setTolerance", "class_e_vs___n_x_t_m_m_x.html#a84d59a6f19c62887fd52299ec5f41336", null ], + [ "startMotorsInSync", "class_e_vs___n_x_t_m_m_x.html#a4e3a2ad104e14663abf69caba0ea455c", null ], + [ "stop", "class_e_vs___n_x_t_m_m_x.html#a699f3fee661c753e34db89825654cc6b", null ], + [ "waitUntilTachoDone", "class_e_vs___n_x_t_m_m_x.html#a75e4e48999e5e542b1e916f02b325593", null ], + [ "waitUntilTimeDone", "class_e_vs___n_x_t_m_m_x.html#a0a47a35af3abaf3d369a53887a2f02be", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_m_m_x.png b/html/class_e_vs___n_x_t_m_m_x.png new file mode 100644 index 0000000000000000000000000000000000000000..d5e5596807db2c3235cbd2aef7fb93d9ad9382ce GIT binary patch literal 1010 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*v!xBIp3|DR|s z-pJTnozkCnZPt{xtqKBEr zC9^rb@?ZJNZwr5=am%;t5|iWacfTEaIqCkV3NSViq z`WH(IMm`-!^?yUnHP^}(Yb#&jU(4BiS2ui% z_~~EQ+5*X{x)fDZRS&jnBHQf4Z7)bPKhw@aGyc z{xfNtHT~_i4J+RV@ceaIaW`B(Ipe?emM63HPT$;r`+dO9b(fyhP1C-wI9YA_Ja6&4 zOKvVSjm+}~hDMTlo65^_PDM{E4-U^u8o+R22XdsI_Bm-TEzxt+SUTk#>jMen1EDb& zZ{BTr_S0#xw$<+07Z!KF?pgQZO_|fgrwqq96&spc1P*8@vJ^}ZV3JU6Vc;vWUsyTs z`DuoN&ifM?c?6so=5Z=AoNp0mNO$5mV64dUV5R`m2Okc`7!NPaxjY9-RXnYx0=23G z<3>P{#lTP9WN%&n>))B0k$JC|YDQ#D{jPfR@oA^Crn5y4m!AC|A8C30oB9>LkEOcY zq0`?K2FGq+Bg?hd_TKa~(`k$E&YN`Qv2xp+A8(5FQ_7dV7p;0{7@cL}b<4o1bgIhA zgEJ@ia)mxFo~g36LU7aMe~F8)N@Pu1yk2K|@(Gs!ap&mBb$gz^vsUrk4|HIUu+yZH z4rHf+9Ndtc)?i&|zOZuN%!_whYERogD=J>}RXg96$8)RZFF#WhSM(`c z>($zoUrQHSiT(atp?~zhZi?AN(Wt!J%dg+O1619=Fi&#UjvE}k{!ZV%>aP!w4KiO= z_pUfX*X-N1qg-oSZf&yb`_^i6^n#ZAcFqLd6y?0)^L3VOJ}1wWXT+a4T+Z=8#fEe5 z^|$iwBHF;n;9!(dY5_;HbBwNu@8uFb2IfDE4`l3Z9v$c`0A^4IPgg&ebxsLQ07?JD Ae*gdg literal 0 HcmV?d00001 diff --git a/html/class_e_vs___n_x_t_servo-members.html b/html/class_e_vs___n_x_t_servo-members.html new file mode 100644 index 0000000..0313d15 --- /dev/null +++ b/html/class_e_vs___n_x_t_servo-members.html @@ -0,0 +1,178 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTServo Member List
+
+
+ +

This is the complete list of members for EVs_NXTServo, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
editMacro()EVs_NXTServo
EVs_NXTServo(uint8_t i2c_address=0xb0)EVs_NXTServo
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getBatteryVoltage()EVs_NXTServo
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
gotoEEPROM()EVs_NXTServo
haltMacro()EVs_NXTServo
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_NXTServo
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
pauseMacro()EVs_NXTServo
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
reset()EVs_NXTServo
restart(uint8_t addressRW)SoftI2cMaster
resumeMacro()EVs_NXTServo
runServo(uint8_t number, uint8_t position, uint8_t speed)EVs_NXTServo
setAddress(uint8_t address)EVShieldI2C
setPosition(uint8_t number, uint8_t position)EVs_NXTServo
setSpeed(uint8_t number, uint8_t speed)EVs_NXTServo
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
storeInitial()EVs_NXTServo
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___n_x_t_servo.html b/html/class_e_vs___n_x_t_servo.html new file mode 100644 index 0000000..22df7e3 --- /dev/null +++ b/html/class_e_vs___n_x_t_servo.html @@ -0,0 +1,576 @@ + + + + + + +EVShield: EVs_NXTServo Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTServo Class Reference
+
+
+ +

This class interfaces with NXTServo attached to EVShield. + More...

+ +

#include <EVs_NXTServo.h>

+
+Inheritance diagram for EVs_NXTServo:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_NXTServo (uint8_t i2c_address=0xb0)
 
uint8_t issueCommand (char command)
 
uint8_t getBatteryVoltage ()
 
bool storeInitial ()
 
bool reset ()
 
bool haltMacro ()
 
bool resumeMacro ()
 
bool gotoEEPROM ()
 
bool editMacro ()
 
bool pauseMacro ()
 
bool setSpeed (uint8_t number, uint8_t speed)
 
bool setPosition (uint8_t number, uint8_t position)
 
void runServo (uint8_t number, uint8_t position, uint8_t speed)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with NXTServo attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_NXTServo::EVs_NXTServo (uint8_t i2c_address = 0xb0)
+
+

class constructor for the NXTServo with optional custom i2c address parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_NXTServo::editMacro ()
+
+

edit the onboard macro

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_NXTServo::getBatteryVoltage ()
+
+

get the battery voltage supplied to the NXTServo

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::gotoEEPROM ()
+
+

reinitialize the macro enviornment

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::haltMacro ()
+
+

stop the onboard macro on the NXTServo

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_NXTServo::issueCommand (char command)
+
+

issue a character command byte to the command register of the NXTServo

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::pauseMacro ()
+
+

temporarily pause the running macro

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::reset ()
+
+

reset all servos to default

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::resumeMacro ()
+
+

resume the onboard macro on the NXTServo

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_NXTServo::runServo (uint8_t number,
uint8_t position,
uint8_t speed 
)
+
+

run the specified to the specified position at the specified speed

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTServo::setPosition (uint8_t number,
uint8_t position 
)
+
+

set the position of a specified servo

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTServo::setSpeed (uint8_t number,
uint8_t speed 
)
+
+

set the speed of a specified servo

+ +
+
+ +
+
+ + + + + + + +
bool EVs_NXTServo::storeInitial ()
+
+

store current settings of servos to initial default setting and remember when powered on

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_servo.js b/html/class_e_vs___n_x_t_servo.js new file mode 100644 index 0000000..f85061d --- /dev/null +++ b/html/class_e_vs___n_x_t_servo.js @@ -0,0 +1,16 @@ +var class_e_vs___n_x_t_servo = +[ + [ "EVs_NXTServo", "class_e_vs___n_x_t_servo.html#ab083aa7404bef94a0f2ee0a7aa1aa313", null ], + [ "editMacro", "class_e_vs___n_x_t_servo.html#a0c04b79441cde46854b9f93ca214d699", null ], + [ "getBatteryVoltage", "class_e_vs___n_x_t_servo.html#ace1e39ba825a1903b34eab23780f65fc", null ], + [ "gotoEEPROM", "class_e_vs___n_x_t_servo.html#a59f0699c4910b03bd62b3db8f8748ece", null ], + [ "haltMacro", "class_e_vs___n_x_t_servo.html#a9473d6091eaa3ac25da5325363bd1674", null ], + [ "issueCommand", "class_e_vs___n_x_t_servo.html#ac1ad10ba093e838627df53070a26255f", null ], + [ "pauseMacro", "class_e_vs___n_x_t_servo.html#a24818e5eda8bd0089e087d57f900c48d", null ], + [ "reset", "class_e_vs___n_x_t_servo.html#a7681e5a2b7e4ea7ed1c74e6038cfc8fb", null ], + [ "resumeMacro", "class_e_vs___n_x_t_servo.html#a6bbe55318077bf1eadf6cbab49ac1490", null ], + [ "runServo", "class_e_vs___n_x_t_servo.html#af50b793e356b6c3c9614250803ffd783", null ], + [ "setPosition", "class_e_vs___n_x_t_servo.html#a757af892cc56fb483a842b51ff11d782", null ], + [ "setSpeed", "class_e_vs___n_x_t_servo.html#a05932335c65899a40c1d75c7fda3a319", null ], + [ "storeInitial", "class_e_vs___n_x_t_servo.html#ac20bb79c2b1977c06a6d25e8c9ec43e8", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_servo.png b/html/class_e_vs___n_x_t_servo.png new file mode 100644 index 0000000000000000000000000000000000000000..d71148b2b7223c2e45a08f7b2a41bf1d8eb6d9b6 GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^SAe*KgBeJ!@G)Hmq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IZ0r+K&Pb#T))2t0V8dIO8$(VCw8gr$2Rn z+MM|-&pB)5{QeR%5BHn-*)gBaO*}B?bNN9++}ZPZhE|P)lb_%8Q(I!P`2%J zCF=Jq-*o=1(nigX_TR7gFZpD;ZTE7OrOC&t7!>>MuWae;@s?IoaX) zzGU^I7j8b-^k%!Rs%LoNmgOohr^ACqPt|jIfu`rG$18&rTMA6wv|0q#u|2StWPJB{ z-n)4krhVI^?q0qtyfkj^oy=1I^8P8G-mnLBdo#{Cw3Ojhfo4PS4iN`gJ=TJ*bg$mW z7WX(DR-4Gm9FUCRTELDSKd1vm62m(ck4r~^dUb&gPzRb5<+bwR=jzzy%Xg;i^PRpX zVV&sy=~HCu^{2*)@6On{&T?q|ExOsU(@qfF3{m(((q+eu zx*~SnIkM*4;yd5cgHnGuSS>qne|hWAIerY)f3}8n-8y$5JBx40vzc*P$FerIrY(6C zb$aQu+e@bLs84+JdQ)M8wZ^v)L)n#=vi2W+&5(1UDa26w>8I|eM}2fprFnE6y)`97 z@SD~Zoxqg&CK{p7-iy2zU)dYJ_Kjw6(Fglfp`&xY1zj^=|Igw#V~ksL(B(g&$DbIp vf+PIEQiiNT%?9B+`ldXG3rrc(f3Qn_b0~T!^^FslYZ*LU{an^LB{Ts5I|$&Q literal 0 HcmV?d00001 diff --git a/html/class_e_vs___n_x_t_touch-members.html b/html/class_e_vs___n_x_t_touch-members.html new file mode 100644 index 0000000..433ca43 --- /dev/null +++ b/html/class_e_vs___n_x_t_touch-members.html @@ -0,0 +1,134 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NXTTouch Member List
+
+
+ +

This is the complete list of members for EVs_NXTTouch, including all inherited members.

+ + + + + + + + + +
EVShieldAGS()EVShieldAGS
EVShieldAGS(EVShield *shield, SH_BankPort bp)EVShieldAGS
init(EVShield *shield, SH_BankPort bp)EVs_NXTTouch
isPressed() (defined in EVs_NXTTouch)EVs_NXTTouch
m_bpEVShieldAGS
mp_shieldEVShieldAGS
readRaw()EVShieldAGS
setType(uint8_t type)EVShieldAGS
+
+ + + + diff --git a/html/class_e_vs___n_x_t_touch.html b/html/class_e_vs___n_x_t_touch.html new file mode 100644 index 0000000..078118a --- /dev/null +++ b/html/class_e_vs___n_x_t_touch.html @@ -0,0 +1,203 @@ + + + + + + +EVShield: EVs_NXTTouch Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NXTTouch Class Reference
+
+
+ +

This class interfaces with LEGO NXT Touch sensor attached to EVShield. + More...

+ +

#include <EVs_NXTTouch.h>

+
+Inheritance diagram for EVs_NXTTouch:
+
+
+ + +EVShieldAGS + +
+ + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
+bool isPressed ()
 
- Public Member Functions inherited from EVShieldAGS
 EVShieldAGS ()
 
 EVShieldAGS (EVShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
int readRaw ()
 
bool init (EVShield *shield, SH_BankPort bp)
 
+ + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldAGS
EVShieldmp_shield
 
SH_BankPort m_bp
 
+

Detailed Description

+

This class interfaces with LEGO NXT Touch sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NXTTouch::init (EVShieldshield,
SH_BankPort bp 
)
+
+

check if the touch sensor is pressed

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___n_x_t_touch.js b/html/class_e_vs___n_x_t_touch.js new file mode 100644 index 0000000..4dd60b5 --- /dev/null +++ b/html/class_e_vs___n_x_t_touch.js @@ -0,0 +1,5 @@ +var class_e_vs___n_x_t_touch = +[ + [ "init", "class_e_vs___n_x_t_touch.html#ad9e15235193cc4dcca1019f7ac83c2e5", null ], + [ "isPressed", "class_e_vs___n_x_t_touch.html#ad181b1de0ca51b1c0e33a848a45185e5", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___n_x_t_touch.png b/html/class_e_vs___n_x_t_touch.png new file mode 100644 index 0000000000000000000000000000000000000000..c65ba310073332e07b5cc11e830e5ae2b1d9b23f GIT binary patch literal 512 zcmeAS@N?(olHy`uVBq!ia0vp^X+Rvn!3-qtD1CSUq$C1-LR|m<{|{uoc=NTi|Ih>= z3ycpOIKbL@M;^%KC<*clW&kPzfvcxNj2IXg`#oJ8Ln;{G&V9X3Tam*}e8!i*@|D}u zLjtVDixyem-1u?zDGl$I%>R>uygs`Ih0a~u8yL#_s@&ky`_J$CBey+SSh{!NjL(m5 z%}<)O?}Ju(%*^@Lvu>AkTQX(tFxB9GZ~I|J+U8Ze%GxdW$j9cI86{OOwtb;uUN?LG zcL~v}VecaN7p?sMcHM54fUYAu%Tg~b`>uE_{py_W+wz;!XXqa-o+KUqXW9{IpPdZT zXX=?dFa7!X$*tYh`5~d{8Ob4`&9@{%uP(Tj803|?i(yd}qRx(4=Es2H&aITBXGj7HiYe7<`YT_>QzP-uPWfm;tO_*XV zy{w!g!rG>GU)QTypKtFtG(*1rMDk76XB;cF&adh&_Sw5o%=pcR!m_zLC5kS~-n`*_ zZ=K=V>4vkivh>&9l6U(oarxG-KYz@Zt&jWsl_gjx>F)PCHx?HcmEH}#mEOO8iy*Us xzxj;Q+hras{HAZ>5FpJg5b~d0RmsTN-t&o=_|vpSCBW!n@O1TaS?83{1OQ|A>TCc2 literal 0 HcmV?d00001 diff --git a/html/class_e_vs___numeric_pad-members.html b/html/class_e_vs___numeric_pad-members.html new file mode 100644 index 0000000..2778a77 --- /dev/null +++ b/html/class_e_vs___numeric_pad-members.html @@ -0,0 +1,169 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_NumericPad Member List
+
+
+ +

This is the complete list of members for EVs_NumericPad, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_NumericPad(uint8_t i2c_address=0xB4)EVs_NumericPad
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
GetKeyPress(int waitPeriod, byte &keyHolder)EVs_NumericPad
GetKeysPressed()EVs_NumericPad
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
InitializeKeypad()EVs_NumericPad
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___numeric_pad.html b/html/class_e_vs___numeric_pad.html new file mode 100644 index 0000000..a592729 --- /dev/null +++ b/html/class_e_vs___numeric_pad.html @@ -0,0 +1,396 @@ + + + + + + +EVShield: EVs_NumericPad Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_NumericPad Class Reference
+
+
+ +

This class interfaces with NumericPad attached to EVShield. + More...

+ +

#include <EVs_NumericPad.h>

+
+Inheritance diagram for EVs_NumericPad:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_NumericPad (uint8_t i2c_address=0xB4)
 
void InitializeKeypad ()
 
bool GetKeyPress (int waitPeriod, byte &keyHolder)
 
int GetKeysPressed ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with NumericPad attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_NumericPad::EVs_NumericPad (uint8_t i2c_address = 0xB4)
+
+

class constructor for the NumericPad with an optional custom i2c address parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_NumericPad::GetKeyPress (int waitPeriod,
byte & keyHolder 
)
+
+

Get the key pressed on the keypad.

+
Parameters
+ + + +
waitPeriodhow long to wait for user to press key (seconds).
keyHolderreturn value of the key user pressed in that time.
+
+
+
Returns
true if there was a key pressed in specified time.
+
+false if no key pressed in the specified time.
+ +
+
+ +
+
+ + + + + + + +
int EVs_NumericPad::GetKeysPressed ()
+
+
Get all the keys pressed by the user at the present moment
+

function returns: integer value of all keys, each bit that is set to 1 represents a key that is pressed. the bits are set as per keyMap. Only 12 bits can be 1.

+ +
+
+ +
+
+ + + + + + + +
void EVs_NumericPad::InitializeKeypad ()
+
+

Initialize the keypad for communication with host. This function also sets up the capacitance values for the keypad with appropriate sensitiviy

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___numeric_pad.js b/html/class_e_vs___numeric_pad.js new file mode 100644 index 0000000..395c088 --- /dev/null +++ b/html/class_e_vs___numeric_pad.js @@ -0,0 +1,7 @@ +var class_e_vs___numeric_pad = +[ + [ "EVs_NumericPad", "class_e_vs___numeric_pad.html#a9c800b7bea84c9f9a7d935bc60e0ec00", null ], + [ "GetKeyPress", "class_e_vs___numeric_pad.html#adb733c7f7e2a7d85857c1b4738036519", null ], + [ "GetKeysPressed", "class_e_vs___numeric_pad.html#ab2876df1903f659982a08eb013c46626", null ], + [ "InitializeKeypad", "class_e_vs___numeric_pad.html#ac8d7796c6b05f801f00a53a368c64d11", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___numeric_pad.png b/html/class_e_vs___numeric_pad.png new file mode 100644 index 0000000000000000000000000000000000000000..51a954c28b7b324136708cc21ba64c75c09fcf8c GIT binary patch literal 1068 zcmeAS@N?(olHy`uVBq!ia0vp^FMzm%gBeKPY7Q3wQW60^A+G=b{|Cvv`C8h4XabN0 z#s>}@VC}pk59D%`1o;Is02P72)l(rx3=GV>JzX3_Dj46+eS2w@0T0{s<;HjZtID%R zT?)E#Jz3COCTxkwq_^&Wyg3wQI9>`naj-j0SaNv7qDdtZdRm^m1%aMfCqrG^f4fi8 zx^w&S-KDqvzV9`+5!Ss|wtGkHtqnJCpVr`C6y_ptBiKAEuYZ^KrD^Vqj^3W;pqBH= zeEEOT*kcBDvjZ;X*M7fMe>S()QSSfBjH(y^Oas@cYiC{Z;rE?ue$9H(&5T)Jx-a_r zUfXc#!>3ES%ZjASvS!qWT=LnwZS(Jh{%MZarhZ+NVX31pviR(-6)mQVQfJ+~HYuf# z-P@e^Y|{RH3zejPKmWX8ZJ7V+yxc3FHWUV#XWlYV(R}>z(%H%9o@H7uF56;m`#-2h zPPad1i%;=-h5wcPY5JQ^pPKe)`}Y^xi+=vPb9eEiDVw*uPp=9OiLJK&FYo)@_h#MR zSIhnf1|OQP6SN~KA$L~f)u~H*oI)ne`c%^I6~rAAGD+&eqDfbT#HTJ{+p$7r>l3d< ziY)~)ZYC`PeasJJ-5T->N*=84=zBcfr=PDz^kVdm_cP>Ve;6%_D`mX(Xb}T2cpIke z&~RXm5m}(B$919MHBhZZ9czR9!|6q=71H9YFF3Jd3ss;+3JmuZJuW2z4TuIh#jdZL zY0FYAE1&tdEB8f3O`HE(GdrSc>2uZ0!!KPn7n}G!yFKsoS__el+f|;<2{rMrwOZa8 zyZpzuWZC9h8Gk0ccw;_))6M9r2p1qeZXR zcm=gy?!J|@<<;Bmo!>HM5J(|@n%hT~PcgW{7V8r}z_Y*4l`-7_b3>Gzi| z%jJs~sjXBrTOK^;PwK08yqEXBH0nII`}5i2u4Sn)qI*qMZr;?8Z%>N2v|?_0f7Hb_ z!I_g{#hsJCuXtIqPBJ!aeax=3oqQYQetyWA=B`zsE_U|zH@hfwli^g*2>&^Q1 zkl~xg^t{mjE!9`HT>0l7%-a?9+TK5~G}$*U>w2UMBj1BHi$2@b8(7Z|Y}mF# + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PFMate Member List
+
+
+ +

This is the complete list of members for EVs_PFMate, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed)EVs_PFMate
EVs_PFMate(uint8_t i2c_address=0x48)EVs_PFMate
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_PFMate
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
sendSignal()EVs_PFMate
setAddress(uint8_t address)EVShieldI2C
setChannel(uint8_t channel)EVs_PFMate
setControl(uint8_t contol)EVs_PFMate
setOperationA(uint8_t operation)EVs_PFMate
setOperationB(uint8_t operation)EVs_PFMate
setSpeedA(uint8_t speed)EVs_PFMate
setSpeedB(uint8_t speed)EVs_PFMate
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___p_f_mate.html b/html/class_e_vs___p_f_mate.html new file mode 100644 index 0000000..57688e7 --- /dev/null +++ b/html/class_e_vs___p_f_mate.html @@ -0,0 +1,512 @@ + + + + + + +EVShield: EVs_PFMate Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_PFMate Class Reference
+
+
+ +

This class interfaces with PFMate attached to EVShield. + More...

+ +

#include <EVs_PFMate.h>

+
+Inheritance diagram for EVs_PFMate:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_PFMate (uint8_t i2c_address=0x48)
 
uint8_t issueCommand (char command)
 
bool sendSignal ()
 
void controlMotor (uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed)
 
bool setChannel (uint8_t channel)
 
bool setControl (uint8_t contol)
 
bool setOperationA (uint8_t operation)
 
bool setOperationB (uint8_t operation)
 
bool setSpeedA (uint8_t speed)
 
bool setSpeedB (uint8_t speed)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with PFMate attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_PFMate::EVs_PFMate (uint8_t i2c_address = 0x48)
+
+

class constructor for PFMate with optional custom i2c address as a parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_PFMate::controlMotor (uint8_t channel,
uint8_t contol,
uint8_t operation,
uint8_t speed 
)
+
+

control the PF motors on the channel the receiver is set to, which motors to control, the operation for the motors, and the speed to run them

+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_PFMate::issueCommand (char command)
+
+

issue char command byte to the command register of the PFMate

+ +
+
+ +
+
+ + + + + + + +
bool EVs_PFMate::sendSignal ()
+
+

send the data to the PF receiver

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setChannel (uint8_t channel)
+
+

set which channel the PF receiver is on so the PFMate can talk with it

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setControl (uint8_t contol)
+
+

set which motor to control

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setOperationA (uint8_t operation)
+
+

set the operation of motor A

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setOperationB (uint8_t operation)
+
+

set the operation of motor B

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setSpeedA (uint8_t speed)
+
+

set the speed of motor A

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_PFMate::setSpeedB (uint8_t speed)
+
+

set the speed of motor B

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___p_f_mate.js b/html/class_e_vs___p_f_mate.js new file mode 100644 index 0000000..45a9012 --- /dev/null +++ b/html/class_e_vs___p_f_mate.js @@ -0,0 +1,13 @@ +var class_e_vs___p_f_mate = +[ + [ "EVs_PFMate", "class_e_vs___p_f_mate.html#a51ca2413ea1fee3958061c1eb87ed5e2", null ], + [ "controlMotor", "class_e_vs___p_f_mate.html#a6b3801954159c05506b082d3e1264224", null ], + [ "issueCommand", "class_e_vs___p_f_mate.html#a602494f8115f3f54be3b0fd5436dee9b", null ], + [ "sendSignal", "class_e_vs___p_f_mate.html#a247951c4e3e8f59344c0aa56fd3eb94a", null ], + [ "setChannel", "class_e_vs___p_f_mate.html#a7c18a4167d9641daecbe245d9851926a", null ], + [ "setControl", "class_e_vs___p_f_mate.html#a6d608f73e17f7baedfd29ec71cb7aa0d", null ], + [ "setOperationA", "class_e_vs___p_f_mate.html#adab606da4f300960b4c2d29e0f4185c8", null ], + [ "setOperationB", "class_e_vs___p_f_mate.html#af8924c7a534df5f896183e9b3042e03e", null ], + [ "setSpeedA", "class_e_vs___p_f_mate.html#a3b24aa7dc32894cc770214694cf0407c", null ], + [ "setSpeedB", "class_e_vs___p_f_mate.html#a692f3f3af0d38e744d4a4263be7927d1", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___p_f_mate.png b/html/class_e_vs___p_f_mate.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ace5d5b13c4a48ad994d021ee98dae686de7aa GIT binary patch literal 995 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*Bo)l{8yD1 zIxy|v2QmMJRz0_J6#6!7{TJ|WQjnLq^FMFRrLz@1FRhJG^xQR7VA7KAmI*3fKgBJ4 z_*vbP*Y54>?cO&WD>k%uOI*IKbHkJii9 zpZ0WR+Xbok^BdKN^Ez1<=8CNB3xX$T1mHCBw3xl4J6T{vXfdj5i91ErkFzq<;yX9D+ zj6CxJ)jDJ57YZ#5Ho{H}^Eee5&bJ6Oq&smOFji!FFjIi3V#1W5U6KvYJtmcCE3#bh z2f9NQXvF;93m^W@UiW$V($t;0(^n;So;vTnX}!JJs&%U)&F;9Li(h*xdyD--tE2Bt z^+O^zyb~$7n~&$LzIY<_Fvrx; zNlUoWowjL+^gcH8T=h{YMg4EW;;F_VqVDmbdA82aSaQz=tUmR0`JKOfo|p82j{XZw zDX~f|48K4@|U--WO?0Lo*kVPxoqE}zKv*T=vZe;0{-t1@pmOEW7Ro}Ab=?c|1 z^$K71&irhCe?I3~?`ik%aLxQ8?c{ypl1cohkR4XeVJ{x=Ty=82I&;F#+p-g41%E8t zZ?z^hY3o<5E2|QD7gn8SeD>6Ng~+a8#p(+&^B3Ov*RLBsgK2qvekk9A>mSuk)<>7e vZ3KB)-~c!lfDw7*veRJ$p6^T-4%UBKXRq<}&6ZwZj%4t3^>bP0l+XkKTK&g+ literal 0 HcmV?d00001 diff --git a/html/class_e_vs___p_s_p_nx-members.html b/html/class_e_vs___p_s_p_nx-members.html new file mode 100644 index 0000000..59d2568 --- /dev/null +++ b/html/class_e_vs___p_s_p_nx-members.html @@ -0,0 +1,176 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PSPNx Member List
+
+
+ +

This is the complete list of members for EVs_PSPNx, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
deEnergize()EVs_PSPNx
energize()EVs_PSPNx
EVs_PSPNx(uint8_t i2c_address=0x02)EVs_PSPNx
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getButtons(int8_t *buttons1, int8_t *buttons2)EVs_PSPNx
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
getXLJoy()EVs_PSPNx
getXRJoy()EVs_PSPNx
getYLJoy()EVs_PSPNx
getYRJoy()EVs_PSPNx
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_PSPNx
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setAnalogMode()EVs_PSPNx
setDigitalMode()EVs_PSPNx
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___p_s_p_nx.html b/html/class_e_vs___p_s_p_nx.html new file mode 100644 index 0000000..c2a318f --- /dev/null +++ b/html/class_e_vs___p_s_p_nx.html @@ -0,0 +1,516 @@ + + + + + + +EVShield: EVs_PSPNx Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_PSPNx Class Reference
+
+
+ +

This class interfaces with PSP-Nx attached to EVShield. + More...

+ +

#include <EVs_PSPNx.h>

+
+Inheritance diagram for EVs_PSPNx:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_PSPNx (uint8_t i2c_address=0x02)
 
uint8_t issueCommand (char command)
 
bool energize ()
 
bool deEnergize ()
 
bool setDigitalMode ()
 
bool setAnalogMode ()
 
int8_t getXLJoy ()
 
int8_t getYLJoy ()
 
int8_t getXRJoy ()
 
int8_t getYRJoy ()
 
void getButtons (int8_t *buttons1, int8_t *buttons2)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with PSP-Nx attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_PSPNx::EVs_PSPNx (uint8_t i2c_address = 0x02)
+
+

class constructor for the EVs_PSPNx class with an optional custom i2c address parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool EVs_PSPNx::deEnergize ()
+
+

power off the joystick receiver

+ +
+
+ +
+
+ + + + + + + +
bool EVs_PSPNx::energize ()
+
+

power on the joystick receiver

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void EVs_PSPNx::getButtons (int8_t * buttons1,
int8_t * buttons2 
)
+
+

get the current button status of button set 1 and button set 2

+ +
+
+ +
+
+ + + + + + + +
int8_t EVs_PSPNx::getXLJoy ()
+
+
get the x-coordinate of the left joystick, 
+
Returns
number between -100 and +100 and zero when the joystick is neutral.
+ +
+
+ +
+
+ + + + + + + +
int8_t EVs_PSPNx::getXRJoy ()
+
+
get the x-coordinate of the right joystick
+
Returns
number between -100 and +100 and zero when the joystick is neutral.
+ +
+
+ +
+
+ + + + + + + +
int8_t EVs_PSPNx::getYLJoy ()
+
+
get the y-coordinate of the left joystick
+
Returns
number between -100 and +100 and zero when the joystick is neutral.
+ +
+
+ +
+
+ + + + + + + +
int8_t EVs_PSPNx::getYRJoy ()
+
+
get the y-coordinate of the right joystick
+
Returns
number between -100 and +100 and zero when the joystick is neutral.
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_PSPNx::issueCommand (char command)
+
+

issue a character command byte to the command register of the PSPNx

+ +
+
+ +
+
+ + + + + + + +
bool EVs_PSPNx::setAnalogMode ()
+
+

set the mode of the joystick to analog

+ +
+
+ +
+
+ + + + + + + +
bool EVs_PSPNx::setDigitalMode ()
+
+

set the mode of the joystick to digital

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___p_s_p_nx.js b/html/class_e_vs___p_s_p_nx.js new file mode 100644 index 0000000..a44b677 --- /dev/null +++ b/html/class_e_vs___p_s_p_nx.js @@ -0,0 +1,14 @@ +var class_e_vs___p_s_p_nx = +[ + [ "EVs_PSPNx", "class_e_vs___p_s_p_nx.html#a8e46dd537931cc027d6aab520f57790b", null ], + [ "deEnergize", "class_e_vs___p_s_p_nx.html#a8f00bdb01ca7e9bb52083e03a8ee360d", null ], + [ "energize", "class_e_vs___p_s_p_nx.html#a572af683fe30b610e1b1e0f07d67888a", null ], + [ "getButtons", "class_e_vs___p_s_p_nx.html#a3b8de6c620cb170828ce7e20626ffa3d", null ], + [ "getXLJoy", "class_e_vs___p_s_p_nx.html#a599123f9fae35c23bca151dd571f2211", null ], + [ "getXRJoy", "class_e_vs___p_s_p_nx.html#a43c5a1236b7336928244bba9e509b374", null ], + [ "getYLJoy", "class_e_vs___p_s_p_nx.html#aa69f498a21023bb0aeb5628fa3f09767", null ], + [ "getYRJoy", "class_e_vs___p_s_p_nx.html#afa304b80a39d3e93e192a46247cdcac1", null ], + [ "issueCommand", "class_e_vs___p_s_p_nx.html#a33772ecfbb4903fb5ca63cf75d572342", null ], + [ "setAnalogMode", "class_e_vs___p_s_p_nx.html#aa5fee8ab25a656dee53aa620bf645b99", null ], + [ "setDigitalMode", "class_e_vs___p_s_p_nx.html#a8e8285ef5635503b8caae12e2ac8d0cf", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___p_s_p_nx.png b/html/class_e_vs___p_s_p_nx.png new file mode 100644 index 0000000000000000000000000000000000000000..ad019a51e8b433eb605eb1980a5ba791d2cfceff GIT binary patch literal 991 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*-!}F5Hd(l~S zb(5|u_hels^}wCV!ewH5D}TM_Hq~9zJA0j( zf3bvM)N}R!=4aFUFU580Ki1@Z@<4c@?uY01rn2hyEK2p#@n2s#;I*L&)g|H zJ*y;dPTtP6%x|%^`8w)z7v=_*ZQW&g#Vn@mxPEKa-@}VGMBnxccUvJFHI;37bl&AS z-P6&s3uWTZZ=Abevexz46L+oN!!O>+rGq}T6mx1>hD(u?dSG8XRpm%HK#VFzJ1%{bw2aLcfPewIrZe$=WDLU znPnNFQ(tp>Uh0ta00shgbt z{6~U8@1wO*1EUki0b@m$2QvkjKKO7jR;aZw*a$l@%;QvSVE5EqI-9YgPsMXPQ0wEC z2`aHlEeyvpTb8|lUmUaUn)T~U%MkNxE8f<6etR#^9eO-xo8&v?>F$x1?!Sdswg0fq z;|`tnrZ_03`Wj!WSpU<2wa0#i=lgqReVpiAR`YF_=%(G5zH|M3V_1DXBPaDR$JEeC zOSsaVwrPm;KCYe=^4Rr+->-vi+Lj@r?(v~|&nKK*pw?a$npb`LZn?*#e=~r-QU?Z! zkRpqLA27wJI&mb-0VO4d<7XK1ALTlI{$sRwJ7;apz0@yO3s)2|?Bi5qINu`BkdD*G z$kHDaE}Qt8Gk=izUM>#uyubml1>1JV%$WB3?(&~UV!kh~GuVvw=VxJW2M7q*X`sfJX>e?q{RL9NAE5aIB@?_P)6kTjSG)*G4=rC uWjcpqL!lGL10jEI-^(UXEZ-=FY4ra@dYq9GI+ZBxvX + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_PiLight Member List
+
+
+ +

This is the complete list of members for EVs_PiLight, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
createPiLight(uint8_t red, uint8_t green, uint8_t blue)EVs_PiLight
EVs_PiLight(uint8_t i2c_address=0x30)EVs_PiLight
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readPiLight(color &currcolor)EVs_PiLight
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setTimeout1(uint8_t timeoutValue)EVs_PiLight
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___pi_light.html b/html/class_e_vs___pi_light.html new file mode 100644 index 0000000..3546f38 --- /dev/null +++ b/html/class_e_vs___pi_light.html @@ -0,0 +1,415 @@ + + + + + + +EVShield: EVs_PiLight Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_PiLight Class Reference
+
+
+ +

This class interfaces with PiLight sensor attached to EVShield. + More...

+ +

#include <EVs_PiLight.h>

+
+Inheritance diagram for EVs_PiLight:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_PiLight (uint8_t i2c_address=0x30)
 
void readPiLight (color &currcolor)
 
void setTimeout1 (uint8_t timeoutValue)
 
void createPiLight (uint8_t red, uint8_t green, uint8_t blue)
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with PiLight sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_PiLight::EVs_PiLight (uint8_t i2c_address = 0x30)
+
+

constructor for the PiLight; may supply an optional custom i2c address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void EVs_PiLight::createPiLight (uint8_t red,
uint8_t green,
uint8_t blue 
)
+
+

Set the color of the PiLight

+
Parameters
+ + + + +
redset the value of the red color
greenset the value of the green color
blueset the value of the blue color
+
+
+
Returns
parameter is returned with values
+ +
+
+ +
+
+ + + + + + + + +
void EVs_PiLight::readPiLight (colorcurrcolor)
+
+

Get the read, green, and blue color values from the PiLight

+
Parameters
+ + +
colorstructure
+
+
+
Returns
parameter is returned with values
+ +
+
+ +
+
+ + + + + + + + +
void EVs_PiLight::setTimeout1 (uint8_t timeoutValue)
+
+

Set a time out time in seconds

+
Parameters
+ + +
timeoutValuewill turn off PiLight after a specified time if no communication
+
+
+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___pi_light.js b/html/class_e_vs___pi_light.js new file mode 100644 index 0000000..2a7d272 --- /dev/null +++ b/html/class_e_vs___pi_light.js @@ -0,0 +1,7 @@ +var class_e_vs___pi_light = +[ + [ "EVs_PiLight", "class_e_vs___pi_light.html#ae29b6b6b1dd2a2be60919989b9b207a8", null ], + [ "createPiLight", "class_e_vs___pi_light.html#a0bd5c96bb3d6198e589d402725f8262d", null ], + [ "readPiLight", "class_e_vs___pi_light.html#aa06532aec1ebec33d6ba1c5cc8e2c1c5", null ], + [ "setTimeout1", "class_e_vs___pi_light.html#a28c395521daed9da1af711dae963163b", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___pi_light.png b/html/class_e_vs___pi_light.png new file mode 100644 index 0000000000000000000000000000000000000000..fa1ab94f25de66a3dcdabd3c1cb04f870fb2ee21 GIT binary patch literal 993 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*t))FI?bge#wwn>M732sw+lH9Un) zFVCrJnf5XAzwg)8?(6iAKmYfH>)He1g}NVpn+LAv)K1y8ZLbNd^zOL6+I)~yDm4dY}>5r73(b4_sMfj{nhT7XuiF7Sx>;-tx3{z^mh7I zZ#Om# zMbtuglc!>~%yiG7PH{!+7wp`+?-wdr{yJ6kTF%IN#VzNxI@|X?eP^xW`G1B0(+hQA zCumKOq_utLMof!VM2pj-guxqEO;n}BWmlyy1q~ZRCYYvC#^Jka8DZh8ReDqGe z@FuRQ#$P&Ta4nm8x3+u_=hJ=ioW4@reCa20Cfj%~uRbACAz~DMI&J0jJNe>SDVy$V zPT73(e(N=t_m%ul_2hMS{@EL~`OY)8Cy(v98A}R+dc7A`-s4Lu-zi{lTz}3&=d1C1 so-punD1u`Z9+H5a*T|r+Gm>(HDUHx3vIVCg!0E@}JQ2+n{ literal 0 HcmV?d00001 diff --git a/html/class_e_vs___r_t_c-members.html b/html/class_e_vs___r_t_c-members.html new file mode 100644 index 0000000..5a627a5 --- /dev/null +++ b/html/class_e_vs___r_t_c-members.html @@ -0,0 +1,173 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_RTC Member List
+
+
+ +

This is the complete list of members for EVs_RTC, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_RTC(uint8_t i2c_address=0xD0)EVs_RTC
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getDayMonth()EVs_RTC
getDayWeek()EVs_RTC
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getHours()EVs_RTC
getMinutes()EVs_RTC
getMonth()EVs_RTC
getSeconds()EVs_RTC
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
getYear()EVs_RTC
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___r_t_c.html b/html/class_e_vs___r_t_c.html new file mode 100644 index 0000000..1c56e41 --- /dev/null +++ b/html/class_e_vs___r_t_c.html @@ -0,0 +1,446 @@ + + + + + + +EVShield: EVs_RTC Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_RTC Class Reference
+
+
+ +

This class interfaces with RTC attached to EVShield. + More...

+ +

#include <EVs_RTC.h>

+
+Inheritance diagram for EVs_RTC:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_RTC (uint8_t i2c_address=0xD0)
 
uint8_t getSeconds ()
 
uint8_t getMinutes ()
 
uint8_t getHours ()
 
uint8_t getDayWeek ()
 
uint8_t getDayMonth ()
 
uint8_t getMonth ()
 
uint8_t getYear ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with RTC attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_RTC::EVs_RTC (uint8_t i2c_address = 0xD0)
+
+

class constructor of the RTC with an optional custom i2c address parameter

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getDayMonth ()
+
+

get the current day reading of the clock (1-31)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getDayWeek ()
+
+

get the current day of the week reading of the clock (0-7 starting on Sunday)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getHours ()
+
+

get the current hours reading of the clock (1-24)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getMinutes ()
+
+

get the current minutes reading of the clock (0-59)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getMonth ()
+
+

get the current month of the year reading of the clock (1-12)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getSeconds ()
+
+

get the current seconds reading of the clock (0-59)

+ +
+
+ +
+
+ + + + + + + +
uint8_t EVs_RTC::getYear ()
+
+

get the current year reading of the clock

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___r_t_c.js b/html/class_e_vs___r_t_c.js new file mode 100644 index 0000000..d530fd8 --- /dev/null +++ b/html/class_e_vs___r_t_c.js @@ -0,0 +1,11 @@ +var class_e_vs___r_t_c = +[ + [ "EVs_RTC", "class_e_vs___r_t_c.html#a1e683c4d0d9d6d0027feb6981191fc2e", null ], + [ "getDayMonth", "class_e_vs___r_t_c.html#a9f97b7025ad74dda5e801159533dec0c", null ], + [ "getDayWeek", "class_e_vs___r_t_c.html#a84673518308a5d6d247a6bd22679a0c1", null ], + [ "getHours", "class_e_vs___r_t_c.html#ae3810e1a309e7bccb0e0d8a55fb65d29", null ], + [ "getMinutes", "class_e_vs___r_t_c.html#a3b99652d2ca334fd89d49c447287d175", null ], + [ "getMonth", "class_e_vs___r_t_c.html#aea502a02fc4e559ab00efeacecf2ea38", null ], + [ "getSeconds", "class_e_vs___r_t_c.html#abb65e0d41884aa6af64c8577a8951e33", null ], + [ "getYear", "class_e_vs___r_t_c.html#a384a496dece9ae7b7920b44f84c35c42", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___r_t_c.png b/html/class_e_vs___r_t_c.png new file mode 100644 index 0000000000000000000000000000000000000000..1d69c0b412bd41c8c6c684e846d8fad367b966e7 GIT binary patch literal 961 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*l$P;xVfluQ)*Pb7scn&G zWA>%^`stZ$kJ)N+eBC|qX_F@}e5$cKYPn^I`JVTE@my1X$#)-0%=O=8%WNCoy zmdi{(Zp&!NZHqoUZQnYXU%df4*V{b{_-(u8+N@QlZr*-cts&2!x+(VQr|J_^PHugE z$JI2mEW>rGweX}R-5F0NsQlGcRPmhKGC`$R$Z66QPY%yZ8vY_)noF|{oivx0=rYuv zVJI(jPxlv|^<295-HSJwPV4pF8Sh%W`8cQRRAveF76vO$#fCs9js=qim?Ttz+{$?u zY|ekqW!Q1#{Rsv(4n>CZEdmYcP8dp7|Vp@H(Bh75w^tPKl)x9-8!1Bm< zL;WlJQr1tt`}NGNg%=)el1^_twly{bI3jMG?b3PMlt~5q4sjhbmp5eA&cT zoVh^$dbzk0!{ZhK2XRFfgLCcgw*A_2XI=BQ**m+ocFh!C_^3iatNx9qL#O`2?X1J6l#@eq-=-^>bP0 Hl+XkKudB1( literal 0 HcmV?d00001 diff --git a/html/class_e_vs___sumo_eyes-members.html b/html/class_e_vs___sumo_eyes-members.html new file mode 100644 index 0000000..53a0f6b --- /dev/null +++ b/html/class_e_vs___sumo_eyes-members.html @@ -0,0 +1,138 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_SumoEyes Member List
+
+
+ +

This is the complete list of members for EVs_SumoEyes, including all inherited members.

+ + + + + + + + + + + + + +
detectObstacleZone()EVs_SumoEyes
EVShieldAGS()EVShieldAGS
EVShieldAGS(EVShield *shield, SH_BankPort bp)EVShieldAGS
init(EVShield *shield, SH_BankPort bp)EVs_SumoEyes
m_bpEVShieldAGS
mp_shieldEVShieldAGS
OBZoneToString(SE_Zone ob)EVs_SumoEyes
readRaw()EVShieldAGS
setLongRange()EVs_SumoEyes
setShortRange()EVs_SumoEyes
setType(int8_t type)EVs_SumoEyes
EVShieldAGS::setType(uint8_t type)EVShieldAGS
+
+ + + + diff --git a/html/class_e_vs___sumo_eyes.html b/html/class_e_vs___sumo_eyes.html new file mode 100644 index 0000000..3394af0 --- /dev/null +++ b/html/class_e_vs___sumo_eyes.html @@ -0,0 +1,292 @@ + + + + + + +EVShield: EVs_SumoEyes Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_SumoEyes Class Reference
+
+
+ +

This class interfaces with EVTSumoEyes sensor attached to EVShield. + More...

+ +

#include <EVs_SumoEyes.h>

+
+Inheritance diagram for EVs_SumoEyes:
+
+
+ + +EVShieldAGS + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

bool init (EVShield *shield, SH_BankPort bp)
 
bool setType (int8_t type)
 
bool setLongRange ()
 
bool setShortRange ()
 
SE_Zone detectObstacleZone ()
 
char * OBZoneToString (SE_Zone ob)
 
- Public Member Functions inherited from EVShieldAGS
 EVShieldAGS ()
 
 EVShieldAGS (EVShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
int readRaw ()
 
bool init (EVShield *shield, SH_BankPort bp)
 
+ + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldAGS
EVShieldmp_shield
 
SH_BankPort m_bp
 
+

Detailed Description

+

This class interfaces with EVTSumoEyes sensor attached to EVShield.

+

Member Function Documentation

+ +
+
+ + + + + + + +
SE_Zone EVs_SumoEyes::detectObstacleZone ()
+
+

detect the where the obstacle is

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool EVs_SumoEyes::init (EVShieldshield,
SH_BankPort bp 
)
+
+

initialize the SumoEyes with a pointer to the EVShield and the bankport it is connected to

+ +
+
+ +
+
+ + + + + + + + +
char * EVs_SumoEyes::OBZoneToString (SE_Zone ob)
+
+

convert the detected zone to a readable string

+ +
+
+ +
+
+ + + + + + + +
bool EVs_SumoEyes::setLongRange ()
+
+

set the analog mode of the sensor to get readings for long range

+ +
+
+ +
+
+ + + + + + + +
bool EVs_SumoEyes::setShortRange ()
+
+

set the analog mode of the sensor to get readings for short range

+ +
+
+ +
+
+ + + + + + + + +
bool EVs_SumoEyes::setType (int8_t type)
+
+

set the analog type of the sensor

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___sumo_eyes.js b/html/class_e_vs___sumo_eyes.js new file mode 100644 index 0000000..c0a8d6e --- /dev/null +++ b/html/class_e_vs___sumo_eyes.js @@ -0,0 +1,9 @@ +var class_e_vs___sumo_eyes = +[ + [ "detectObstacleZone", "class_e_vs___sumo_eyes.html#a3c1467b2446e1fd1e97e378931d3e05a", null ], + [ "init", "class_e_vs___sumo_eyes.html#aa6d4d555b651984c898cb9e37b3b642e", null ], + [ "OBZoneToString", "class_e_vs___sumo_eyes.html#a7da5a0bf3eb529ea8f26237e22964a2c", null ], + [ "setLongRange", "class_e_vs___sumo_eyes.html#ab1b5fcd60f8be78228159c2f87ead375", null ], + [ "setShortRange", "class_e_vs___sumo_eyes.html#a462ff88cd8ae25b4a0b4b969e90f0b8c", null ], + [ "setType", "class_e_vs___sumo_eyes.html#ae1c5ab83d4986d398ad973bbeff7d4cf", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___sumo_eyes.png b/html/class_e_vs___sumo_eyes.png new file mode 100644 index 0000000000000000000000000000000000000000..82903b30acba88ddde69df0005f1984f04ced7e7 GIT binary patch literal 532 zcmV+v0_**WP)vTJkN^MxkN^Mxkifve1&Q1r00008bW%=J0RR90|NsC0)yh;d0004_NklPA~X66ig|wS z(XITBpQfSQ2;2U09D9^(47iA`Z~AiuQ${0-3nRnEkWz5>L{lE$BU`B@mFrz~On9+Zy7-P(GVE`8EPylAMnc{oF zFDtY=1ZXK31GJPVaic|f)_pgld{mTY;+!g5{e~yt5VZ@TIQF~AL!T0}=W~)#ZnH>I z7uC`Y(Roo9O##xU5B2A$si-x(6-(Tz%2~d$8H-Ptds9DSs=4*vD~h)*?3$F+W=)FE z%!o3mOFGgS3x~1jDLI*ONOq^k06w6$w*e*mdjNQ&&dtxp((`rx@&nB1%P7Vevsyo! WVHNE*dOo250000 + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVs_VoltMeter Member List
+
+
+ +

This is the complete list of members for EVs_VoltMeter, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_bufferBaseI2CDevicestatic
_i2c_bufferEVShieldI2C
_so_bufferSoftI2cMaster
b_initialized (defined in BaseI2CDevice)BaseI2CDevicestatic
BaseI2CDevice(uint8_t i2c_address)BaseI2CDevice
checkAddress() (defined in EVShieldI2C)EVShieldI2C
EVs_VoltMeter(uint8_t i2c_address=0x26)EVs_VoltMeter
EVShieldI2C(uint8_t i2c_address)EVShieldI2C
getAddress()BaseI2CDevice
getAVoltage()EVs_VoltMeter
getDeviceID()EVShieldI2C
getErrorCode()EVShieldI2C
getFeatureSet()EVShieldI2C
getFirmwareVersion()EVShieldI2C
getReference()EVs_VoltMeter
getRVoltage()EVs_VoltMeter
getVendorID()EVShieldI2C
BaseI2CDevice::getWriteErrorCode()BaseI2CDevice
SoftI2cMaster::getWriteErrorCode()SoftI2cMaster
init(void *shield, SH_BankPort bp)EVShieldI2C
BaseI2CDevice::initProtocol()BaseI2CDevice
SoftI2cMaster::initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
issueCommand(char command)EVs_VoltMeter
m_protocolEVShieldI2C
mp_shieldEVShieldI2C
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)EVShieldI2C
readInteger(uint8_t location)EVShieldI2C
readLong(uint8_t location)EVShieldI2C
readRegisters(uint8_t start_register, uint8_t bytes, uint8_t *buf)EVShieldI2C
BaseI2CDevice::readRegisters(uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)BaseI2CDevice
readString(uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)EVShieldI2C
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)EVShieldI2C
setReferenceV()EVs_VoltMeter
setWriteErrorCode(uint8_t code)BaseI2CDeviceprotected
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)EVShieldI2C
writeInteger(uint8_t location, uint16_t data)EVShieldI2C
writeLong(uint8_t location, uint32_t data)EVShieldI2C
writeRegisters(uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)EVShieldI2C
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_e_vs___volt_meter.html b/html/class_e_vs___volt_meter.html new file mode 100644 index 0000000..3854854 --- /dev/null +++ b/html/class_e_vs___volt_meter.html @@ -0,0 +1,414 @@ + + + + + + +EVShield: EVs_VoltMeter Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
EVs_VoltMeter Class Reference
+
+
+ +

This class interfaces with sensor attached to EVShield. + More...

+ +

#include <EVs_NXTVoltMeter.h>

+
+Inheritance diagram for EVs_VoltMeter:
+
+
+ + +EVShieldI2C +BaseI2CDevice +SoftI2cMaster + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 EVs_VoltMeter (uint8_t i2c_address=0x26)
 
uint8_t issueCommand (char command)
 
int getAVoltage ()
 
int getRVoltage ()
 
int getReference ()
 
int setReferenceV ()
 
- Public Member Functions inherited from EVShieldI2C
 EVShieldI2C (uint8_t i2c_address)
 
void init (void *shield, SH_BankPort bp)
 
uint8_t readByte (uint8_t location)
 
uint16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes, uint8_t *buf)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
uint8_t getErrorCode ()
 
+bool checkAddress ()
 
bool setAddress (uint8_t address)
 
- Public Member Functions inherited from BaseI2CDevice
 BaseI2CDevice (uint8_t i2c_address)
 
void initProtocol ()
 
uint8_t * readRegisters (uint8_t start_register, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0, bool clear_buffer=false)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * readString (uint8_t location, uint8_t bytes_to_read, uint8_t *buffer=0, uint8_t buffer_length=0)
 
bool writeRegisters (uint8_t start_register, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
bool checkAddress ()
 
bool setAddress (uint8_t i2c_address)
 
uint8_t getAddress ()
 
uint8_t getWriteErrorCode ()
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
char * getFeatureSet ()
 
- Public Member Functions inherited from SoftI2cMaster
uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Public Attributes inherited from EVShieldI2C
void * mp_shield
 
uint8_t * _i2c_buffer
 
uint8_t m_protocol
 
- Public Attributes inherited from SoftI2cMaster
uint8_t * _so_buffer
 
- Static Public Attributes inherited from BaseI2CDevice
static uint8_t * _buffer = 0
 
+static bool b_initialized = false
 
- Protected Member Functions inherited from BaseI2CDevice
void setWriteErrorCode (uint8_t code)
 
+

Detailed Description

+

This class interfaces with sensor attached to EVShield.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
EVs_VoltMeter::EVs_VoltMeter (uint8_t i2c_address = 0x26)
+
+

Constructor for the class; may supply an optional custom i2c address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
int EVs_VoltMeter::getAVoltage ()
+
+

Get the Absolute Voltage

+
Returns
Absolute Voltage value
+ +
+
+ +
+
+ + + + + + + +
int EVs_VoltMeter::getReference ()
+
+

Get the Reference Voltage

+
Returns
Reference Voltage value
+ +
+
+ +
+
+ + + + + + + +
int EVs_VoltMeter::getRVoltage ()
+
+

Get the Relative Voltage

+
Returns
Relative Voltage value
+ +
+
+ +
+
+ + + + + + + + +
uint8_t EVs_VoltMeter::issueCommand (char command)
+
+

Write a command byte at the command register of the device

+ +
+
+ +
+
+ + + + + + + +
int EVs_VoltMeter::setReferenceV ()
+
+

Set the Reference Voltage to current Absolute Voltage

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_e_vs___volt_meter.js b/html/class_e_vs___volt_meter.js new file mode 100644 index 0000000..35f422d --- /dev/null +++ b/html/class_e_vs___volt_meter.js @@ -0,0 +1,9 @@ +var class_e_vs___volt_meter = +[ + [ "EVs_VoltMeter", "class_e_vs___volt_meter.html#a76a15d5c173b68bc031c3d56e1968d13", null ], + [ "getAVoltage", "class_e_vs___volt_meter.html#a91b46c1a6ab0a4607c331cd9384e646e", null ], + [ "getReference", "class_e_vs___volt_meter.html#a1e0527292e9d30177439a865c07ac244", null ], + [ "getRVoltage", "class_e_vs___volt_meter.html#ad143f2d4659e8769b09211eae27ed090", null ], + [ "issueCommand", "class_e_vs___volt_meter.html#a4329a9220c9a2a439c5cf17a599d44b5", null ], + [ "setReferenceV", "class_e_vs___volt_meter.html#a670de184f55761c348559c8409ace039", null ] +]; \ No newline at end of file diff --git a/html/class_e_vs___volt_meter.png b/html/class_e_vs___volt_meter.png new file mode 100644 index 0000000000000000000000000000000000000000..be8580e84c783494bfa40698c612471498dbd31e GIT binary patch literal 1014 zcmeAS@N?(olHy`uVBq!ia0vp^7l62fgBeIJTt4*v!xBIp3|DR|c zc#u)QIwk!46w{R@JuHb*Z71V{yk4ehte+CJOLCIR-7e8dOQJayJ$HF>NSto{=Hstjj`yt@WM+Ue;ZzW)*@=OaBBOqbI0{ zQi^Yxlwa_=o3q}A1RwsBs=npY>37%ONoKLfZGPPDwDn(N;EgwL&xN?H;9YCQwp=rO zi}>lUD`gkn*&mm@+d(}vFW>dm%1>&!PMd@0bA~GC@tyz2cXR5UFMpx~Ep9)GTEUyU zo#EdXo>2bVS2iqte@XIJXTaR>_VgEj>N8fF`cB4-UpJLQV|goQe%`P8<)E-U~|| zFRbBVnEs=eXF;<7(+3|8#tO9-1{+}~hIyQd4Ch+}8q$FZ9YOKKFi+X@(%KdQ2YW>o z&*>bB4Rulr6RT?1eZG5XQ%$UX=;2GNZS+s>tB+idVX7av}-5dA3{xW5Wn0)$)W9jds6=zS~SN>vl^0uoPQ#K{GT#KEw zge%=?o5mWc~SH`{j8HwZ7B~eVSCH8op}E z>9xH98za5DVkP38N;T?*HyuryeVBoNqi~I8=2@|~oHrjo(|KC7YR&4swyw)g)z+`$ zyB74?XX@`*#fItvRg?F(_qU2zvt01!V2n`$2S$UpjjjpL;R1aI**}aIPuV-{+NgK~ Qm`NEtUHx3vIVCg!0OYmJ*Z=?k literal 0 HcmV?d00001 diff --git a/html/class_soft_i2c_master-members.html b/html/class_soft_i2c_master-members.html new file mode 100644 index 0000000..8ecefdb --- /dev/null +++ b/html/class_soft_i2c_master-members.html @@ -0,0 +1,150 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
SoftI2cMaster Member List
+
+
+ +

This is the complete list of members for SoftI2cMaster, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
_so_bufferSoftI2cMaster
checkAddress()SoftI2cMaster
getDeviceID()SoftI2cMaster
getFirmwareVersion()SoftI2cMaster
getVendorID()SoftI2cMaster
getWriteErrorCode()SoftI2cMaster
initProtocol(uint8_t sclPin=NULL, uint8_t sdaPin=NULL)SoftI2cMaster
read(uint8_t last)SoftI2cMaster
readByte(uint8_t location)SoftI2cMaster
readInteger(uint8_t location)SoftI2cMaster
readLong(uint8_t location)SoftI2cMaster
readRegisters(uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)SoftI2cMaster
readString(uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)SoftI2cMaster
restart(uint8_t addressRW)SoftI2cMaster
setAddress(uint8_t address)SoftI2cMaster
SoftI2cMaster(uint8_t devAddr)SoftI2cMaster
start(uint8_t addressRW)SoftI2cMaster
stop(void)SoftI2cMaster
write(uint8_t b)SoftI2cMaster
writeByte(uint8_t location, uint8_t data)SoftI2cMaster
writeInteger(uint8_t location, uint16_t data)SoftI2cMaster
writeLong(uint8_t location, uint32_t data)SoftI2cMaster
writeRegisters(uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)SoftI2cMaster
writeRegistersWithLocation(int bytes, uint8_t *buf)SoftI2cMaster
+
+ + + + diff --git a/html/class_soft_i2c_master.html b/html/class_soft_i2c_master.html new file mode 100644 index 0000000..9e5a555 --- /dev/null +++ b/html/class_soft_i2c_master.html @@ -0,0 +1,732 @@ + + + + + + +EVShield: SoftI2cMaster Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
SoftI2cMaster Class Reference
+
+
+ +

This class implements software i2c interface used by EVShield/NXShield on Arduino. + More...

+ +

#include <SoftI2cMaster.h>

+
+Inheritance diagram for SoftI2cMaster:
+
+
+ + +EVShieldI2C +EVs_AbsoluteIMU +EVs_AngleSensor +EVs_CurrentMeter +EVs_DISTNx +EVs_LightSensorArray +EVs_LineLeader +EVs_MagicWand +EVs_NumericPad +EVs_NXTCam +EVs_NXTMMX +EVs_NXTServo +EVs_PFMate +EVs_PiLight +EVs_PSPNx +EVs_RTC +EVs_VoltMeter +EVShieldBank + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

uint8_t start (uint8_t addressRW)
 
void stop (void)
 
uint8_t restart (uint8_t addressRW)
 
uint8_t write (uint8_t b)
 
uint8_t read (uint8_t last)
 
 SoftI2cMaster (uint8_t devAddr)
 
void initProtocol (uint8_t sclPin=NULL, uint8_t sdaPin=NULL)
 
uint8_t * readRegisters (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL)
 
bool writeRegistersWithLocation (int bytes, uint8_t *buf)
 
bool writeRegisters (uint8_t location, uint8_t bytes_to_write, uint8_t *buffer=0)
 
bool writeByte (uint8_t location, uint8_t data)
 
bool writeInteger (uint8_t location, uint16_t data)
 
bool writeLong (uint8_t location, uint32_t data)
 
char * readString (uint8_t startRegister, uint8_t bytes, uint8_t *buf=NULL, uint8_t len=0)
 
uint8_t readByte (uint8_t location)
 
int16_t readInteger (uint8_t location)
 
uint32_t readLong (uint8_t location)
 
char * getFirmwareVersion ()
 
char * getVendorID ()
 
char * getDeviceID ()
 
uint8_t getWriteErrorCode ()
 
bool checkAddress ()
 
bool setAddress (uint8_t address)
 
+ + + +

+Public Attributes

uint8_t * _so_buffer
 
+

Detailed Description

+

This class implements software i2c interface used by EVShield/NXShield on Arduino.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + +
SoftI2cMaster::SoftI2cMaster (uint8_t devAddr)
+
+

class constructor supplies the device address

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + +
bool SoftI2cMaster::checkAddress ()
+
+

this function checks to see if there is any device at its specified address

+ +
+
+ +
+
+ + + + + + + +
char * SoftI2cMaster::getDeviceID ()
+
+

get the name of the device

+ +
+
+ +
+
+ + + + + + + +
char * SoftI2cMaster::getFirmwareVersion ()
+
+

get the version of the firmware

+ +
+
+ +
+
+ + + + + + + +
char * SoftI2cMaster::getVendorID ()
+
+

get the name of the vendor

+ +
+
+ +
+
+ + + + + + + +
uint8_t SoftI2cMaster::getWriteErrorCode ()
+
+

Get error of last i2c operation

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void SoftI2cMaster::initProtocol (uint8_t sclPin = NULL,
uint8_t sdaPin = NULL 
)
+
+

init bus custom scl and sda pins are optional

+ +
+
+ +
+
+ + + + + + + + +
uint8_t SoftI2cMaster::read (uint8_t last)
+
+

read a byte and send Ack if last is false else Nak to terminate read

+ +
+
+ +
+
+ + + + + + + + +
uint8_t SoftI2cMaster::readByte (uint8_t location)
+
+

read one byte starting at the location

+ +
+
+ +
+
+ + + + + + + + +
int16_t SoftI2cMaster::readInteger (uint8_t location)
+
+

read two bytes and parse as an integer starting at the location

+ +
+
+ +
+
+ + + + + + + + +
uint32_t SoftI2cMaster::readLong (uint8_t location)
+
+

read and parse as integer type long at the location

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uint8_t * SoftI2cMaster::readRegisters (uint8_t startRegister,
uint8_t bytes,
uint8_t * buf = NULL 
)
+
+

read number of bytes from start register and return values; optional buffer

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
char * SoftI2cMaster::readString (uint8_t startRegister,
uint8_t bytes,
uint8_t * buf = NULL,
uint8_t len = 0 
)
+
+

read specified number of bytes starting at the startRegister

+ +
+
+ +
+
+ + + + + + + + +
uint8_t SoftI2cMaster::restart (uint8_t addressRW)
+
+

issue stop condition, pull down scl, and start again

+ +
+
+ +
+
+ + + + + + + + +
bool SoftI2cMaster::setAddress (uint8_t address)
+
+
set the i2c address for this device 
+
Parameters
+ + +
addressnew device address.
+
+
+ +
+
+ +
+
+ + + + + + + + +
uint8_t SoftI2cMaster::start (uint8_t addressRW)
+
+

issue a start condition for i2c address with read/write bit

+ +
+
+ +
+
+ + + + + + + + +
void SoftI2cMaster::stop (void )
+
+

issue a stop condition

+ +
+
+ +
+
+ + + + + + + + +
uint8_t SoftI2cMaster::write (uint8_t b)
+
+

write byte and return true for Ack or false for Nak

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SoftI2cMaster::writeByte (uint8_t location,
uint8_t data 
)
+
+

write one byte starting at the specified register location

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SoftI2cMaster::writeInteger (uint8_t location,
uint16_t data 
)
+
+

write integer starting at the specified register location

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SoftI2cMaster::writeLong (uint8_t location,
uint32_t data 
)
+
+

write integer type long starting at the specified register location

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool SoftI2cMaster::writeRegisters (uint8_t location,
uint8_t bytes_to_write,
uint8_t * buffer = 0 
)
+
+

write bytes starting at the specified register location

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
bool SoftI2cMaster::writeRegistersWithLocation (int bytes,
uint8_t * buf 
)
+
+

write number of bytes from buffer

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
uint8_t* SoftI2cMaster::_so_buffer
+
+

internal buffer

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + + diff --git a/html/class_soft_i2c_master.js b/html/class_soft_i2c_master.js new file mode 100644 index 0000000..7fe4ec2 --- /dev/null +++ b/html/class_soft_i2c_master.js @@ -0,0 +1,27 @@ +var class_soft_i2c_master = +[ + [ "SoftI2cMaster", "class_soft_i2c_master.html#a0f66140cabee79a0808cbb787c400ede", null ], + [ "checkAddress", "class_soft_i2c_master.html#a62833e2fc5f4786b5def66d13dd253ab", null ], + [ "getDeviceID", "class_soft_i2c_master.html#adddf8de6aba30a49b85a438ac9f3fc22", null ], + [ "getFirmwareVersion", "class_soft_i2c_master.html#a98a396e17232562c58c7b69529ef173d", null ], + [ "getVendorID", "class_soft_i2c_master.html#a7f8e401b7954d26feffc35dc8b372801", null ], + [ "getWriteErrorCode", "class_soft_i2c_master.html#afb577969af4dd9ff2dd151995fe0abed", null ], + [ "initProtocol", "class_soft_i2c_master.html#aa24d152f5c3731e4c2e62727a63308ac", null ], + [ "read", "class_soft_i2c_master.html#a56993378a66a702113eef640d8c82ea9", null ], + [ "readByte", "class_soft_i2c_master.html#a8748cc831e388dd54dbb1dde1979494b", null ], + [ "readInteger", "class_soft_i2c_master.html#a4901745d1f01c61103903d4b0f7d69d3", null ], + [ "readLong", "class_soft_i2c_master.html#a9b3218c20426f37b6ec5e07564efd224", null ], + [ "readRegisters", "class_soft_i2c_master.html#ac6c75241a8bd558f78bd606eca55744e", null ], + [ "readString", "class_soft_i2c_master.html#abfcb8a7e7873e907f9a82b849bc62534", null ], + [ "restart", "class_soft_i2c_master.html#a5b05701c7ba1b7cccb2420ec2b302e1b", null ], + [ "setAddress", "class_soft_i2c_master.html#a797f72d6a39d718a3af8bfc536075055", null ], + [ "start", "class_soft_i2c_master.html#ab75987e5c66784705a8d24415f13ae1a", null ], + [ "stop", "class_soft_i2c_master.html#ad8f52e1cbf15894472881afe439afa02", null ], + [ "write", "class_soft_i2c_master.html#a1d018fd6ce8520e42f9a6bb22a564293", null ], + [ "writeByte", "class_soft_i2c_master.html#a74ad7f13d13606b8d5c8caf6b045c79d", null ], + [ "writeInteger", "class_soft_i2c_master.html#a2c1c4cbd49819647b153efd682cc27dd", null ], + [ "writeLong", "class_soft_i2c_master.html#a22e0660fa387a6e2c8b2875fd7c4ed72", null ], + [ "writeRegisters", "class_soft_i2c_master.html#a2ffec80191a07d54b6eea197f53fad21", null ], + [ "writeRegistersWithLocation", "class_soft_i2c_master.html#ab831e67e1da5f14586bfe2ce6fab68aa", null ], + [ "_so_buffer", "class_soft_i2c_master.html#a15bf802b18606d9eac5352c39fbb1e7f", null ] +]; \ No newline at end of file diff --git a/html/class_soft_i2c_master.png b/html/class_soft_i2c_master.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f0992765921f3ff27a623f1a4cf3f3a40c868f GIT binary patch literal 6647 zcmdT}c~leU-j29Xv`SlBQ4p}Th1)7?5RkC6)k@I>EQ=@-77;L5NRfmk5Q0nLdO^@q zfe<0J;2>d>vP2TLf*3Ug#F0fpl4=@a0tstC5|Z4BQmXy#y?@;A_MCRknUi@ZGjlS} z`+J|?^E^3!(9?bWTEn$47;L@A=X%0)#N4OLrtCSid*+qy|H8C$CXG} z?RI!H?_<6$KZDd$+2h6Jw9Wf_rG@}w>*tx(u3%(R>IgBhO!E=Ixo${8AN>xE$wSgZ z?YVBIEYkQ;ZVWsN=q7%Q_R2z393AMCg_f?Ubeen1b;BihK$sF}&F$&=CKJ1|S^N~s zXy}a!4PcB6&Lz!e#l@trN#yF~P3i(&)AbPnZ}PA^K|(}JAO*&YAO9eQ5Nk2;L>L%g ziJoCj5IU#v^F{+^X{3W>*s*Y(zhBndcE~L4@bX~pM`SRxnQm++GhudV3DEcWriXgl ze9h7x(!GmdJb$w^Q{VSry5p7G|I5M9BXWA^=J=srpI+6gMKkU z&cAt0an|#8ePG9gV@+?ly0p&PLibK)d3-SCkkuXjBtRJey6)8N3q@fL&U*a zvaiM?-21|1k6nk%`VW(R!q)g{NjOPadDD*Z@gK+oe@5k#T29sf_ z2QU50N%${OT$)8`j~xW#?iJ&GY9x*7{mO6pv7oiujnA3-9M5I1%Z#gN5r+&D=lTUU zt1r|H_A34%o-6abi{oxFJt+@_gNXzMk(oS_)fwwLzoTFi7?Cu0AfHN4c4+po;SK;F zfcvIaOgh*`mkkmgxNNKL-jqB;3He6hkIZKae>h3wn2=2dN0}_i&!JeC?>wCf2VUp+ z1Tz+QZU{oQJ#-l#>~Vk4$;m@53)>bpX3K_l?~9RAcncg~o-EIB^NQ zd*fHccxROeKGAKkiNE+j7@3sGSlk*H9bg;%wnN&R?48*gpJLPR674MVCc7TbA(Y@3Fd5zOb(DAm(CqcdM_P0qMmWatk5`My* zM;T+!a#8;Y@!zwIKW&O8VUD`pSlswHnRN`Bf#Pw(dk9r1L-lnW9G$T5+b)4ipvq9U z=dv(9g%fOhK@g|LE7KvUDHt14F}f%fMbBpDa&INNH9aeYPM?Bipv67q4V7N51PIFp zl8&A8aLCC?5(evEj|EUAUrzBqMib}4Ud#b{{?2UbgQ~n*eAJ{WgPua@*k=PmmcEkSw#h^}$an$s$1EpNwXfNA?9#px>M-~i6TjsN?%hOHBK`4gwEmxv20m*RKBT`Xh_S30%-*T-& z&D2$!adEL%0x1n*gBCGF#*xPjSwlH_5&hJMeb0M`c8xAC*zvR4M&oLh<}zHQ_jAhc zyWjthc>m4Qn9uuwCoH+%EmuGOav?BZ60%2v>t}`WP?g zO6zoVMyR3g9mm$HQ9xB4}fT(W^{;9cj$2NVe!s{yxhf$C1O{HVoye-AwATtO~+)- zeY+K9AKr9sP#}~x&!KNQM%XPLpop*Lvj^j^RC-pk22S-kJve+bTX=#fWv z+fa52H^C)y-v?BVvgyN754e1s7kSh{xM)Rm&Xsr_t&-6+4JGgkVPD>zo_xz!mBZEW zlJ1|-1wq+Ofl19obym9if?vNCB7Hr=mbV7&v@YbYr+|_Kz(&q6{~L+k02Qn z5=Mk~-4X(=c-cXPMW->vX-2@*q9VJiPdcqS(N$&Xs;gz>UU%>$P)2ViliW>EGw&zu z6329g*Z%C~J}8~bBX!`K0xg+!0cvwi--rK z5<(X_^3n7)`&L0C)~P?z_@akAIKfccJx%m!nq*_tOQpXAuWNy}m4!jAj7x^~_%92; z|2d++Y05?fX#IMpXw?mOCA>U!|0~TTBTT_ir(jvz@eAZ^y2!v>J&r1`CJ?4CA}gdT zLFsG-ONB?yyQ2$tlB>_k7$l<)5Ygbf|Ye-T*ctfv!@jf+*3nY^pUo&iu+0x^cF&5KNbHLgtUtw zk^bbmx^gB55D{pkzM2B4oU4`zM~k|CgqBGQASO*POPhg&;BV0UQK3GW1_WFgeF{amTtqhEtIvxy)li=%{IX4#Ko)Dx2M>xu# zl}V#)=!M9p49Pc-p!J1S-TVYiriMc8vg!@`h6=&@aj12UlrqFOO2qc38gpZ8`dVkz zM+Bb81B;|vOVxdUJE$1h0myy1)>V--NuwYe0zanPuEq`0h+mp>eVV~4ROaf@^CLuI z@j<|WJN?yeG4M{XytV|AET*^(&sCxx#4UdTl_;=XQi+VkpCZeOrsmw-=@%q92y1ZD z-WJln^A-0-ixfYOCti#I(*vvPV9l*CRT>0Dhvyn{3vhI3L6 z*Ke^+IG2GRi)C~t6cu3LT9jQi$LzRy)1>YtgaLOz-XvAbMm`eSk7#CZ_&4Lt33v z-DbedWcpI^lMNX7@k3+Xgil+;_wU#0H(fM}!HTuD@OLN?%G``mFKkT>;dlU*Q|&cD z?rF1kX;uxg<=eqiA0+QS>E~}uj4q^N5#mNRXatz<^wJIYR^=D{1G6;Lo1zW5VB%~G##~ul0pvTv z2YthGkY2n9W0d|LQEW7!19vnZ0u7guXd}L@%)>H{Amv2&NN<&?;?ZU&1Z16q4m&sN z`|W9qwQE`BOXOJ<;bmQh}kZoE}1w0%7Vv!nj3GIS4&R(-^dY4ZXpK)1-B;Bo>gD9{uWFBfiVI1xtlhJ+%(lg?(>R=L;MXK zl#7xPCgtqjx$#5+uGy(ZaW?zjtj;eMkgT^luJuiuyxN=)GW8=%^6jgR8V2us1r5qv z%`Ph%ViY5H>_seIPUYDe)Q*dqTcrv{Ne+r^%*=NT z{hEoQ4?tWfqqx-bmYwU&O|sj3OVSxjOQeAyQL7`jdawl+V0?7I$?{h5suIjD!vV*c z_u8%;o$ps`&Mcve(noT(G@zMOBm*-uVP@Q3txD1QQ7d4W-GEs~Q`E17a}5fU!iOtS zIamgyQtbuX7|;_XH=!k6xon4`{+1hc0@|M*h4Ou@vII&)63~~IJgI^tt$TN*^Q6(?{1boKa2Nmp literal 0 HcmV?d00001 diff --git a/html/classes.html b/html/classes.html new file mode 100644 index 0000000..622ee2b --- /dev/null +++ b/html/classes.html @@ -0,0 +1,148 @@ + + + + + + +EVShield: Class Index + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Class Index
+
+
+
A | B | C | E | G | M | S
+ + + + + + + + + + + + + + + +
  A  
+
EVs_AngleSensor   EVs_NumericPad   EVs_SumoEyes   
  M  
+
EVs_CurrentMeter   EVs_NXTCam   EVs_VoltMeter   
accl   EVs_DISTNx   EVs_NXTColor   EVShield   magnetic_field   
  B  
+
EVs_EV3Color   EVs_NXTLight   EVShieldAGS   
  S  
+
EVs_EV3Gyro   EVs_NXTMMX   EVShieldBank   
BaseI2CDevice   EVs_EV3Infrared   EVs_NXTServo   EVShieldBankB   SoftI2cMaster   
  C  
+
EVs_EV3Touch   EVs_NXTTouch   EVShieldI2C   
EVs_EV3Ultrasonic   EVs_PFMate   EVShieldUART   
cmps   EVs_LightSensorArray   EVs_PiLight   
  G  
+
color   EVs_LineLeader   EVs_PSPNx   
  E  
+
EVs_MagicWand   EVs_RTC   gyro   
EVs_AbsoluteIMU   
+
A | B | C | E | G | M | S
+
+
+ + + + diff --git a/html/closed.png b/html/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..98cc2c909da37a6df914fbf67780eebd99c597f5 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT literal 0 HcmV?d00001 diff --git a/html/doxygen.css b/html/doxygen.css new file mode 100644 index 0000000..4699e69 --- /dev/null +++ b/html/doxygen.css @@ -0,0 +1,1357 @@ +/* The standard CSS for doxygen 1.8.5 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0px; + margin: 0px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/html/doxygen.png b/html/doxygen.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff17d807fd8aa003bed8bb2a69e8f0909592fd1 GIT binary patch literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} literal 0 HcmV?d00001 diff --git a/html/dynsections.js b/html/dynsections.js new file mode 100644 index 0000000..ed092c7 --- /dev/null +++ b/html/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} +function toggleLevel(level) +{ + $('table.directory tr').each(function(){ + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + +EVShield: File List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
o*BaseI2CDevice.h
o*EVs_AbsoluteIMU.h
o*EVs_AngleSensor.h
o*EVs_DISTNx.h
o*EVs_EV3Color.h
o*EVs_EV3Gyro.h
o*EVs_EV3Infrared.h
o*EVs_EV3Touch.h
o*EVs_EV3Ultrasonic.h
o*EVs_LightSensorArray.h
o*EVs_LineLeader.h
o*EVs_MagicWand.h
o*EVs_NumericPad.h
o*EVs_NXTCam.h
o*EVs_NXTColor.h
o*EVs_NXTCurrentMeter.h
o*EVs_NXTLight.h
o*EVs_NXTMMX.h
o*EVs_NXTServo.h
o*EVs_NXTTouch.h
o*EVs_NXTVoltMeter.h
o*EVs_PFMate.h
o*EVs_PiLight.h
o*EVs_PSPNx.h
o*EVs_RTC.h
o*EVs_SumoEyes.h
o*EVShield.h
o*EVShieldAGS.h
o*EVShieldI2C.h
o*EVShieldUART.h
o*MsTimer2.h
o*SHDefines.h
\*SoftI2cMaster.h
+
+
+
+ + + + diff --git a/html/files.js b/html/files.js new file mode 100644 index 0000000..fc1c52a --- /dev/null +++ b/html/files.js @@ -0,0 +1,36 @@ +var files = +[ + [ "BaseI2CDevice.h", "_base_i2_c_device_8h_source.html", null ], + [ "EVs_AbsoluteIMU.h", "_e_vs___absolute_i_m_u_8h_source.html", null ], + [ "EVs_AngleSensor.h", "_e_vs___angle_sensor_8h_source.html", null ], + [ "EVs_DISTNx.h", "_e_vs___d_i_s_t_nx_8h_source.html", null ], + [ "EVs_EV3Color.h", "_e_vs___e_v3_color_8h_source.html", null ], + [ "EVs_EV3Gyro.h", "_e_vs___e_v3_gyro_8h_source.html", null ], + [ "EVs_EV3Infrared.h", "_e_vs___e_v3_infrared_8h_source.html", null ], + [ "EVs_EV3Touch.h", "_e_vs___e_v3_touch_8h_source.html", null ], + [ "EVs_EV3Ultrasonic.h", "_e_vs___e_v3_ultrasonic_8h_source.html", null ], + [ "EVs_LightSensorArray.h", "_e_vs___light_sensor_array_8h_source.html", null ], + [ "EVs_LineLeader.h", "_e_vs___line_leader_8h_source.html", null ], + [ "EVs_MagicWand.h", "_e_vs___magic_wand_8h_source.html", null ], + [ "EVs_NumericPad.h", "_e_vs___numeric_pad_8h_source.html", null ], + [ "EVs_NXTCam.h", "_e_vs___n_x_t_cam_8h_source.html", null ], + [ "EVs_NXTColor.h", "_e_vs___n_x_t_color_8h_source.html", null ], + [ "EVs_NXTCurrentMeter.h", "_e_vs___n_x_t_current_meter_8h_source.html", null ], + [ "EVs_NXTLight.h", "_e_vs___n_x_t_light_8h_source.html", null ], + [ "EVs_NXTMMX.h", "_e_vs___n_x_t_m_m_x_8h_source.html", null ], + [ "EVs_NXTServo.h", "_e_vs___n_x_t_servo_8h_source.html", null ], + [ "EVs_NXTTouch.h", "_e_vs___n_x_t_touch_8h_source.html", null ], + [ "EVs_NXTVoltMeter.h", "_e_vs___n_x_t_volt_meter_8h_source.html", null ], + [ "EVs_PFMate.h", "_e_vs___p_f_mate_8h_source.html", null ], + [ "EVs_PiLight.h", "_e_vs___pi_light_8h_source.html", null ], + [ "EVs_PSPNx.h", "_e_vs___p_s_p_nx_8h_source.html", null ], + [ "EVs_RTC.h", "_e_vs___r_t_c_8h_source.html", null ], + [ "EVs_SumoEyes.h", "_e_vs___sumo_eyes_8h_source.html", null ], + [ "EVShield.h", "_e_v_shield_8h.html", "_e_v_shield_8h" ], + [ "EVShieldAGS.h", "_e_v_shield_a_g_s_8h_source.html", null ], + [ "EVShieldI2C.h", "_e_v_shield_i2_c_8h_source.html", null ], + [ "EVShieldUART.h", "_e_v_shield_u_a_r_t_8h_source.html", null ], + [ "MsTimer2.h", "_ms_timer2_8h_source.html", null ], + [ "SHDefines.h", "_s_h_defines_8h.html", "_s_h_defines_8h" ], + [ "SoftI2cMaster.h", "_soft_i2c_master_8h_source.html", null ] +]; \ No newline at end of file diff --git a/html/ftv2blank.png b/html/ftv2blank.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/html/ftv2cl.png b/html/ftv2cl.png new file mode 100644 index 0000000000000000000000000000000000000000..132f6577bf7f085344904602815a260d29f55d9b GIT binary patch literal 453 zcmV;$0XqJPP)VBF;ev;toEj8_OB0EQg5eYilIj#JZG_m^33l3^k4mtzx!TVD?g)Y$ zrvwRDSqT!wLIM$dWCIa$vtxE|mzbTzu-y&$FvF6WA2a{Wr1g}`WdPT-0JzEZ0IxAv z-Z+ejZc&H;I5-pb_SUB}04j0^V)3t{`z<7asDl2Tw3w3sP%)0^8$bhEg)IOTBcRXv zFfq~3&gvJ$F-U7mpBW8z1GY~HK&7h4^YI~Orv~wLnC0PP_dAkv;nzX{9Q|8Gv=2ca z@v)c9T;D#h`TZ2X&&$ff2wedmot995de~-s3I)yauahg;7qn*?1n?F$e+PwP37}~; z1NKUk7reVK^7A;$QRW7qAx40HHUZ<|k3U%nz(Ec`#i+q9K!dgcROAlCS?`L= v>#=f?wF5ZND!1uAfQsk;KN^4&*8~0npJiJ%2dj9(00000NkvXXu0mjfWVFf_ literal 0 HcmV?d00001 diff --git a/html/ftv2doc.png b/html/ftv2doc.png new file mode 100644 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 GIT binary patch literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t literal 0 HcmV?d00001 diff --git a/html/ftv2folderclosed.png b/html/ftv2folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66 GIT binary patch literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA literal 0 HcmV?d00001 diff --git a/html/ftv2lastnode.png b/html/ftv2lastnode.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/html/ftv2link.png b/html/ftv2link.png new file mode 100644 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 GIT binary patch literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t literal 0 HcmV?d00001 diff --git a/html/ftv2mlastnode.png b/html/ftv2mlastnode.png new file mode 100644 index 0000000000000000000000000000000000000000..0b63f6d38c4b9ec907b820192ebe9724ed6eca22 GIT binary patch literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 literal 0 HcmV?d00001 diff --git a/html/ftv2mnode.png b/html/ftv2mnode.png new file mode 100644 index 0000000000000000000000000000000000000000..0b63f6d38c4b9ec907b820192ebe9724ed6eca22 GIT binary patch literal 246 zcmVkw!R34#Lv2LOS^S2tZA31X++9RY}n zChwn@Z)Wz*WWHH{)HDtJnq&A2hk$b-y(>?@z0iHr41EKCGp#T5?07*qoM6N<$f(V3Pvj6}9 literal 0 HcmV?d00001 diff --git a/html/ftv2mo.png b/html/ftv2mo.png new file mode 100644 index 0000000000000000000000000000000000000000..4bfb80f76e65815989a9350ad79d8ce45380e2b1 GIT binary patch literal 403 zcmV;E0c`$>P)${!fXv7NWJ%@%u4(KapRY>T6_x;E zxE7kt!}Tiw8@d9Sd`rTGum>z#Q14vIm`wm1#-byD1muMi02@YNO5LRF0o!Y{`a!Ya z{^&p0Su|s705&2QxmqdexG+-zNKL3f@8gTQSJrKByfo+oNJ^-{|Mn||Q5SDwjQVsS zr1}7o5-QMs>gYIMD>GRw@$lT`z4r-_m{5U#cR{urD_)TOeY)(UD|qZ^&y`IVijqk~ xs(9-kWFr7E^!lgi8GsFK5kOY_{Xbgf0^etEU%fLevs?fG002ovPDHLkV1nB&vX1}& literal 0 HcmV?d00001 diff --git a/html/ftv2node.png b/html/ftv2node.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/html/ftv2ns.png b/html/ftv2ns.png new file mode 100644 index 0000000000000000000000000000000000000000..72e3d71c2892d6f00e259facebc88b45f6db2e35 GIT binary patch literal 388 zcmV-~0ek+5P)f+++#cT|!CkD&4pnIkeMEUEM*>`*9>+Juji$!h-mW%M^8s9957{3nvbrz^&=u<~TAUrFROkmt%^F~Ez+-c53Lv%iH3d38!Rv?K zrb&MYAhp;Gf<}wS;9ZZq2@;!uYG;=Z>~GKE^{HD4keu}lnyqhc>kWX^tQn|warJ~h zT+rtMkdz6aHoN%z(o|&wpu@@OpJnF_z{PA)6(FHw02iHslz^(N{4*+K9)QJHR87wT iTyp>aXaF{u2lxRou|^4tux6eB0000^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K literal 0 HcmV?d00001 diff --git a/html/ftv2pnode.png b/html/ftv2pnode.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ee22f937a07d1dbfc27c669d11f8ed13e2f152 GIT binary patch literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K literal 0 HcmV?d00001 diff --git a/html/ftv2splitbar.png b/html/ftv2splitbar.png new file mode 100644 index 0000000000000000000000000000000000000000..fe895f2c58179b471a22d8320b39a4bd7312ec8e GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T literal 0 HcmV?d00001 diff --git a/html/ftv2vertline.png b/html/ftv2vertline.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/html/functions.html b/html/functions.html new file mode 100644 index 0000000..6c40ba9 --- /dev/null +++ b/html/functions.html @@ -0,0 +1,161 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- _ -

+
+
+ + + + diff --git a/html/functions_0x61.html b/html/functions_0x61.html new file mode 100644 index 0000000..a84d3d7 --- /dev/null +++ b/html/functions_0x61.html @@ -0,0 +1,179 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+
+
+ + + + diff --git a/html/functions_0x62.html b/html/functions_0x62.html new file mode 100644 index 0000000..fe18136 --- /dev/null +++ b/html/functions_0x62.html @@ -0,0 +1,167 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- b -

+
+
+ + + + diff --git a/html/functions_0x63.html b/html/functions_0x63.html new file mode 100644 index 0000000..1881d8d --- /dev/null +++ b/html/functions_0x63.html @@ -0,0 +1,185 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- c -

+
+
+ + + + diff --git a/html/functions_0x64.html b/html/functions_0x64.html new file mode 100644 index 0000000..fa02df9 --- /dev/null +++ b/html/functions_0x64.html @@ -0,0 +1,165 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- d -

+
+
+ + + + diff --git a/html/functions_0x65.html b/html/functions_0x65.html new file mode 100644 index 0000000..4a1ae11 --- /dev/null +++ b/html/functions_0x65.html @@ -0,0 +1,246 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- e -

+
+
+ + + + diff --git a/html/functions_0x67.html b/html/functions_0x67.html new file mode 100644 index 0000000..78173d7 --- /dev/null +++ b/html/functions_0x67.html @@ -0,0 +1,393 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- g -

+
+
+ + + + diff --git a/html/functions_0x68.html b/html/functions_0x68.html new file mode 100644 index 0000000..13cac07 --- /dev/null +++ b/html/functions_0x68.html @@ -0,0 +1,164 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- h -

+
+
+ + + + diff --git a/html/functions_0x69.html b/html/functions_0x69.html new file mode 100644 index 0000000..2eab950 --- /dev/null +++ b/html/functions_0x69.html @@ -0,0 +1,214 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- i -

+
+
+ + + + diff --git a/html/functions_0x6c.html b/html/functions_0x6c.html new file mode 100644 index 0000000..fed11ca --- /dev/null +++ b/html/functions_0x6c.html @@ -0,0 +1,164 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- l -

+
+
+ + + + diff --git a/html/functions_0x6d.html b/html/functions_0x6d.html new file mode 100644 index 0000000..d3d0c75 --- /dev/null +++ b/html/functions_0x6d.html @@ -0,0 +1,294 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- m -

+
+
+ + + + diff --git a/html/functions_0x6e.html b/html/functions_0x6e.html new file mode 100644 index 0000000..669acc4 --- /dev/null +++ b/html/functions_0x6e.html @@ -0,0 +1,155 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- n -

+
+
+ + + + diff --git a/html/functions_0x6f.html b/html/functions_0x6f.html new file mode 100644 index 0000000..a187e25 --- /dev/null +++ b/html/functions_0x6f.html @@ -0,0 +1,155 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- o -

+
+
+ + + + diff --git a/html/functions_0x70.html b/html/functions_0x70.html new file mode 100644 index 0000000..d8a47f2 --- /dev/null +++ b/html/functions_0x70.html @@ -0,0 +1,158 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- p -

+
+
+ + + + diff --git a/html/functions_0x72.html b/html/functions_0x72.html new file mode 100644 index 0000000..5f7c0e0 --- /dev/null +++ b/html/functions_0x72.html @@ -0,0 +1,266 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- r -

+
+
+ + + + diff --git a/html/functions_0x73.html b/html/functions_0x73.html new file mode 100644 index 0000000..297f1d6 --- /dev/null +++ b/html/functions_0x73.html @@ -0,0 +1,315 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- s -

+
+
+ + + + diff --git a/html/functions_0x74.html b/html/functions_0x74.html new file mode 100644 index 0000000..f530488 --- /dev/null +++ b/html/functions_0x74.html @@ -0,0 +1,164 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- t -

+
+
+ + + + diff --git a/html/functions_0x77.html b/html/functions_0x77.html new file mode 100644 index 0000000..f6175ff --- /dev/null +++ b/html/functions_0x77.html @@ -0,0 +1,197 @@ + + + + + + +EVShield: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- w -

+
+
+ + + + diff --git a/html/functions_dup.js b/html/functions_dup.js new file mode 100644 index 0000000..9b42365 --- /dev/null +++ b/html/functions_dup.js @@ -0,0 +1,21 @@ +var functions_dup = +[ + [ "_", "functions.html", null ], + [ "a", "functions_0x61.html", null ], + [ "b", "functions_0x62.html", null ], + [ "c", "functions_0x63.html", null ], + [ "d", "functions_0x64.html", null ], + [ "e", "functions_0x65.html", null ], + [ "g", "functions_0x67.html", null ], + [ "h", "functions_0x68.html", null ], + [ "i", "functions_0x69.html", null ], + [ "l", "functions_0x6c.html", null ], + [ "m", "functions_0x6d.html", null ], + [ "n", "functions_0x6e.html", null ], + [ "o", "functions_0x6f.html", null ], + [ "p", "functions_0x70.html", null ], + [ "r", "functions_0x72.html", null ], + [ "s", "functions_0x73.html", null ], + [ "t", "functions_0x74.html", null ], + [ "w", "functions_0x77.html", null ] +]; \ No newline at end of file diff --git a/html/functions_func.html b/html/functions_func.html new file mode 100644 index 0000000..6e8f253 --- /dev/null +++ b/html/functions_func.html @@ -0,0 +1,156 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- b -

+
+
+ + + + diff --git a/html/functions_func.js b/html/functions_func.js new file mode 100644 index 0000000..304b437 --- /dev/null +++ b/html/functions_func.js @@ -0,0 +1,19 @@ +var functions_func = +[ + [ "b", "functions_func.html", null ], + [ "c", "functions_func_0x63.html", null ], + [ "d", "functions_func_0x64.html", null ], + [ "e", "functions_func_0x65.html", null ], + [ "g", "functions_func_0x67.html", null ], + [ "h", "functions_func_0x68.html", null ], + [ "i", "functions_func_0x69.html", null ], + [ "l", "functions_func_0x6c.html", null ], + [ "m", "functions_func_0x6d.html", null ], + [ "n", "functions_func_0x6e.html", null ], + [ "o", "functions_func_0x6f.html", null ], + [ "p", "functions_func_0x70.html", null ], + [ "r", "functions_func_0x72.html", null ], + [ "s", "functions_func_0x73.html", null ], + [ "t", "functions_func_0x74.html", null ], + [ "w", "functions_func_0x77.html", null ] +]; \ No newline at end of file diff --git a/html/functions_func_0x63.html b/html/functions_func_0x63.html new file mode 100644 index 0000000..8cc9ccf --- /dev/null +++ b/html/functions_func_0x63.html @@ -0,0 +1,183 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- c -

+
+
+ + + + diff --git a/html/functions_func_0x64.html b/html/functions_func_0x64.html new file mode 100644 index 0000000..85bc51f --- /dev/null +++ b/html/functions_func_0x64.html @@ -0,0 +1,163 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- d -

+
+
+ + + + diff --git a/html/functions_func_0x65.html b/html/functions_func_0x65.html new file mode 100644 index 0000000..3eed555 --- /dev/null +++ b/html/functions_func_0x65.html @@ -0,0 +1,238 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- e -

+
+
+ + + + diff --git a/html/functions_func_0x67.html b/html/functions_func_0x67.html new file mode 100644 index 0000000..aad9cdc --- /dev/null +++ b/html/functions_func_0x67.html @@ -0,0 +1,361 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- g -

+
+
+ + + + diff --git a/html/functions_func_0x68.html b/html/functions_func_0x68.html new file mode 100644 index 0000000..3c23801 --- /dev/null +++ b/html/functions_func_0x68.html @@ -0,0 +1,153 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/html/functions_func_0x69.html b/html/functions_func_0x69.html new file mode 100644 index 0000000..c749ce7 --- /dev/null +++ b/html/functions_func_0x69.html @@ -0,0 +1,212 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- i -

+
+
+ + + + diff --git a/html/functions_func_0x6c.html b/html/functions_func_0x6c.html new file mode 100644 index 0000000..e276cf6 --- /dev/null +++ b/html/functions_func_0x6c.html @@ -0,0 +1,162 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- l -

+
+
+ + + + diff --git a/html/functions_func_0x6d.html b/html/functions_func_0x6d.html new file mode 100644 index 0000000..42979bd --- /dev/null +++ b/html/functions_func_0x6d.html @@ -0,0 +1,246 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- m -

+
+
+ + + + diff --git a/html/functions_func_0x6e.html b/html/functions_func_0x6e.html new file mode 100644 index 0000000..30a8782 --- /dev/null +++ b/html/functions_func_0x6e.html @@ -0,0 +1,153 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- n -

+
+
+ + + + diff --git a/html/functions_func_0x6f.html b/html/functions_func_0x6f.html new file mode 100644 index 0000000..77624d6 --- /dev/null +++ b/html/functions_func_0x6f.html @@ -0,0 +1,153 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- o -

+
+
+ + + + diff --git a/html/functions_func_0x70.html b/html/functions_func_0x70.html new file mode 100644 index 0000000..193684c --- /dev/null +++ b/html/functions_func_0x70.html @@ -0,0 +1,156 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- p -

+
+
+ + + + diff --git a/html/functions_func_0x72.html b/html/functions_func_0x72.html new file mode 100644 index 0000000..e948f77 --- /dev/null +++ b/html/functions_func_0x72.html @@ -0,0 +1,261 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- r -

+
+
+ + + + diff --git a/html/functions_func_0x73.html b/html/functions_func_0x73.html new file mode 100644 index 0000000..62318f5 --- /dev/null +++ b/html/functions_func_0x73.html @@ -0,0 +1,313 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- s -

+
+
+ + + + diff --git a/html/functions_func_0x74.html b/html/functions_func_0x74.html new file mode 100644 index 0000000..adbd3b6 --- /dev/null +++ b/html/functions_func_0x74.html @@ -0,0 +1,153 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/html/functions_func_0x77.html b/html/functions_func_0x77.html new file mode 100644 index 0000000..2be7661 --- /dev/null +++ b/html/functions_func_0x77.html @@ -0,0 +1,195 @@ + + + + + + +EVShield: Class Members - Functions + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- w -

+
+
+ + + + diff --git a/html/functions_vars.html b/html/functions_vars.html new file mode 100644 index 0000000..9835a0a --- /dev/null +++ b/html/functions_vars.html @@ -0,0 +1,323 @@ + + + + + + +EVShield: Class Members - Variables + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+  + +

- _ -

+ + +

- a -

+ + +

- b -

+ + +

- e -

+ + +

- g -

+ + +

- h -

    +
  • heading +: cmps +
  • +
  • heading_h +: cmps +
  • +
  • heading_l +: cmps +
  • +
+ + +

- m -

+ + +

- r -

+ + +

- t -

+
+
+ + + + diff --git a/html/globals.html b/html/globals.html new file mode 100644 index 0000000..a4b75d0 --- /dev/null +++ b/html/globals.html @@ -0,0 +1,257 @@ + + + + + + +EVShield: File Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented file members with links to the documentation:
+ +

- f -

+ + +

- s -

+
+
+ + + + diff --git a/html/globals_defs.html b/html/globals_defs.html new file mode 100644 index 0000000..ffe2c1d --- /dev/null +++ b/html/globals_defs.html @@ -0,0 +1,167 @@ + + + + + + +EVShield: File Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
+ + + + diff --git a/html/globals_enum.html b/html/globals_enum.html new file mode 100644 index 0000000..78e3b30 --- /dev/null +++ b/html/globals_enum.html @@ -0,0 +1,149 @@ + + + + + + +EVShield: File Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
+ + + + diff --git a/html/globals_eval.html b/html/globals_eval.html new file mode 100644 index 0000000..3743ece --- /dev/null +++ b/html/globals_eval.html @@ -0,0 +1,182 @@ + + + + + + +EVShield: File Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
+ + + + diff --git a/html/globals_func.html b/html/globals_func.html new file mode 100644 index 0000000..b217da8 --- /dev/null +++ b/html/globals_func.html @@ -0,0 +1,131 @@ + + + + + + +EVShield: File Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/html/hierarchy.html b/html/hierarchy.html new file mode 100644 index 0000000..66c62d9 --- /dev/null +++ b/html/hierarchy.html @@ -0,0 +1,166 @@ + + + + + + +EVShield: Class Hierarchy + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCaccl
oCBaseI2CDeviceThis class implements hardware I2C protocol used by EVShield/NXShield on an Arduino
|\CEVShieldI2CThis class implements I2C interfaces used by EVShield
| oCEVs_AbsoluteIMUThis class interfaces with AbsoluteIMU sensor attached to EVShield
| oCEVs_AngleSensorThis class interfaces with sensor attached to EVShield
| oCEVs_CurrentMeterThis class interfaces with sensor attached to EVShield
| oCEVs_DISTNxThis class interfaces with DIST-Nx attached to EVShield
| oCEVs_LightSensorArrayThis class interfaces with LightSensorArray attached to EVShield
| oCEVs_LineLeaderThis class interfaces with NXTLineLeader sensor attached to EVShield
| oCEVs_MagicWandThis class interfaces with Magic Wand attached to EVShield
| oCEVs_NumericPadThis class interfaces with NumericPad attached to EVShield
| oCEVs_NXTCamThis class interfaces with NXTCam attached to EVShield
| oCEVs_NXTMMXThis class interfaces with NXTMMX attached to EVShield
| oCEVs_NXTServoThis class interfaces with NXTServo attached to EVShield
| oCEVs_PFMateThis class interfaces with PFMate attached to EVShield
| oCEVs_PiLightThis class interfaces with PiLight sensor attached to EVShield
| oCEVs_PSPNxThis class interfaces with PSP-Nx attached to EVShield
| oCEVs_RTCThis class interfaces with RTC attached to EVShield
| oCEVs_VoltMeterThis class interfaces with sensor attached to EVShield
| \CEVShieldBankThis class defines methods for the EVShield Bank(s)
|  \CEVShieldBankBEVShield has two banks. Bank B has few differences from Bank A. This class defines overriding methods for the EVShield Bank B
oCcmps
oCcolor
oCEVs_NXTColorEVShield Analog Sensor class
oCEVShieldThis class defines methods to access EVShield features
oCEVShieldAGSEVShield Analog Sensor class
|oCEVs_NXTLightThis class interfaces with LEGO Light sensor attached to EVShield
|oCEVs_NXTTouchThis class interfaces with LEGO NXT Touch sensor attached to EVShield
|\CEVs_SumoEyesThis class interfaces with EVTSumoEyes sensor attached to EVShield
oCEVShieldUARTEVShield UART Sensor class. also provides support for the EV3 Touch Sensor
|oCEVs_EV3ColorThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
|oCEVs_EV3GyroThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
|oCEVs_EV3InfraredThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
|oCEVs_EV3TouchThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
|\CEVs_EV3UltrasonicThis class interfaces with LEGO EV3 Touch sensor attached to EVShield
oCgyro
oCmagnetic_field
\CSoftI2cMasterThis class implements software i2c interface used by EVShield/NXShield on Arduino
 \CEVShieldI2CThis class implements I2C interfaces used by EVShield
+
+
+
+ + + + diff --git a/html/hierarchy.js b/html/hierarchy.js new file mode 100644 index 0000000..3fa9bdf --- /dev/null +++ b/html/hierarchy.js @@ -0,0 +1,48 @@ +var hierarchy = +[ + [ "accl", "structaccl.html", null ], + [ "BaseI2CDevice", "class_base_i2_c_device.html", [ + [ "EVShieldI2C", "class_e_v_shield_i2_c.html", [ + [ "EVs_AbsoluteIMU", "class_e_vs___absolute_i_m_u.html", null ], + [ "EVs_AngleSensor", "class_e_vs___angle_sensor.html", null ], + [ "EVs_CurrentMeter", "class_e_vs___current_meter.html", null ], + [ "EVs_DISTNx", "class_e_vs___d_i_s_t_nx.html", null ], + [ "EVs_LightSensorArray", "class_e_vs___light_sensor_array.html", null ], + [ "EVs_LineLeader", "class_e_vs___line_leader.html", null ], + [ "EVs_MagicWand", "class_e_vs___magic_wand.html", null ], + [ "EVs_NumericPad", "class_e_vs___numeric_pad.html", null ], + [ "EVs_NXTCam", "class_e_vs___n_x_t_cam.html", null ], + [ "EVs_NXTMMX", "class_e_vs___n_x_t_m_m_x.html", null ], + [ "EVs_NXTServo", "class_e_vs___n_x_t_servo.html", null ], + [ "EVs_PFMate", "class_e_vs___p_f_mate.html", null ], + [ "EVs_PiLight", "class_e_vs___pi_light.html", null ], + [ "EVs_PSPNx", "class_e_vs___p_s_p_nx.html", null ], + [ "EVs_RTC", "class_e_vs___r_t_c.html", null ], + [ "EVs_VoltMeter", "class_e_vs___volt_meter.html", null ], + [ "EVShieldBank", "class_e_v_shield_bank.html", [ + [ "EVShieldBankB", "class_e_v_shield_bank_b.html", null ] + ] ] + ] ] + ] ], + [ "cmps", "structcmps.html", null ], + [ "color", "structcolor.html", null ], + [ "EVs_NXTColor", "class_e_vs___n_x_t_color.html", null ], + [ "EVShield", "class_e_v_shield.html", null ], + [ "EVShieldAGS", "class_e_v_shield_a_g_s.html", [ + [ "EVs_NXTLight", "class_e_vs___n_x_t_light.html", null ], + [ "EVs_NXTTouch", "class_e_vs___n_x_t_touch.html", null ], + [ "EVs_SumoEyes", "class_e_vs___sumo_eyes.html", null ] + ] ], + [ "EVShieldUART", "class_e_v_shield_u_a_r_t.html", [ + [ "EVs_EV3Color", "class_e_vs___e_v3_color.html", null ], + [ "EVs_EV3Gyro", "class_e_vs___e_v3_gyro.html", null ], + [ "EVs_EV3Infrared", "class_e_vs___e_v3_infrared.html", null ], + [ "EVs_EV3Touch", "class_e_vs___e_v3_touch.html", null ], + [ "EVs_EV3Ultrasonic", "class_e_vs___e_v3_ultrasonic.html", null ] + ] ], + [ "gyro", "structgyro.html", null ], + [ "magnetic_field", "structmagnetic__field.html", null ], + [ "SoftI2cMaster", "class_soft_i2c_master.html", [ + [ "EVShieldI2C", "class_e_v_shield_i2_c.html", null ] + ] ] +]; \ No newline at end of file diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..8c8cfa3 --- /dev/null +++ b/html/index.html @@ -0,0 +1,134 @@ + + + + + + +EVShield: EVShield Library Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
EVShield Library Reference
+
+
+

+Introduction

+

EVShield library provides interfaces to use EVShield by OpenElectrons.com on Arduino.

+

At the time of this writing, EVShield and this library can be used with following boards:

+

Arduino boards:
+ Uno, Uno R3
+ Duemilanove
+

+

+Getting Started

+

If you need help to begin with your first program, please download and review EVShield-AVR-Library-Tutorial.pdf from following url: http://www.openelectrons.com/docs/viewdoc/25

+

+More Information

+

More information about EVShield is available at: http://www.openelectrons.com/evshield

+

Online documentation of this Library Reference is available at: http://www.openelectrons.com/EVShield/html/ (Note however, the online version may not match exactly with the library files you have installed on your computer).

+

+Installation Instructions

+

To install this library in your Arduino IDE, download the latest zip file from following location: http://www.openelectrons.com/evshield

+

And follow the instructions at that url to install it on your computer.

+
+
+ + + + diff --git a/html/jquery.js b/html/jquery.js new file mode 100644 index 0000000..3db33e6 --- /dev/null +++ b/html/jquery.js @@ -0,0 +1,72 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); +/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null; +p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + +
+
+
accl Member List
+
+
+ +

This is the complete list of members for accl, including all inherited members.

+
+ + + + + + + + + + + + + +
axaccl
ax_haccl
ax_laccl
ayaccl
ay_haccl
ay_laccl
azaccl
az_haccl
az_laccl
erroraccl
txaccl
tyaccl
tzaccl
+ + + + + diff --git a/html/structaccl.html b/html/structaccl.html new file mode 100644 index 0000000..cbe40ab --- /dev/null +++ b/html/structaccl.html @@ -0,0 +1,334 @@ + + + + + + +EVShield: accl Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
accl Struct Reference
+
+
+ +

#include <EVs_AbsoluteIMU.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

short tx
 
short ty
 
short tz
 
short ax_h
 
short ax_l
 
short ay_h
 
short ay_l
 
short az_h
 
short az_l
 
int ax
 
int ay
 
int az
 
int error
 
+

Detailed Description

+

Accelerometer and Tilt related data

+

Member Data Documentation

+ +
+
+ + + + +
int accl::ax
+
+

Accelerometer x-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::ax_h
+
+

Accelerometer HSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::ax_l
+
+

Accelerometer LSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int accl::ay
+
+

Accelerometer y-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::ay_h
+
+

Accelerometer HSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::ay_l
+
+

Accelerometer LSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int accl::az
+
+

Accelerometer z-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::az_h
+
+

Accelerometer HSB z-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::az_l
+
+

Accelerometer LSB z-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int accl::error
+
+

Error generated in case of communication breakdown

+ +
+
+ +
+
+ + + + +
short accl::tx
+
+

Tilt x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::ty
+
+

Tilt y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short accl::tz
+
+

Tilt z-axis value generated by AbsoluteIMU

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/html/structaccl.js b/html/structaccl.js new file mode 100644 index 0000000..07087a9 --- /dev/null +++ b/html/structaccl.js @@ -0,0 +1,16 @@ +var structaccl = +[ + [ "ax", "structaccl.html#a45b3e6593a0909a05b4f05d74919cd2a", null ], + [ "ax_h", "structaccl.html#acea82630fcda2102ed5211e57b9f1a2f", null ], + [ "ax_l", "structaccl.html#a101ed9081257bb7570f1c6141f65997f", null ], + [ "ay", "structaccl.html#af0170b8779e4e297b9f12b883ec66d1d", null ], + [ "ay_h", "structaccl.html#a6bc4b2597c258fde704a8a03aae53afd", null ], + [ "ay_l", "structaccl.html#a2583884cda4816b971391774c4c6964f", null ], + [ "az", "structaccl.html#a20162e753cfb8cfcf22645d23a0667da", null ], + [ "az_h", "structaccl.html#a82e1843b79538ecd6713f495e37ff54f", null ], + [ "az_l", "structaccl.html#a4a7b583f2e6a92bed89b730c931895c3", null ], + [ "error", "structaccl.html#ae5396a5b106d2dbb92ba64ae35275606", null ], + [ "tx", "structaccl.html#a8d5e3fe0c79fede88054f43fc42f8c40", null ], + [ "ty", "structaccl.html#a08177872b7651bfe29f15b810d2fc16d", null ], + [ "tz", "structaccl.html#afaf44150f70df4a4472d1e2cae6a9059", null ] +]; \ No newline at end of file diff --git a/html/structcmps-members.html b/html/structcmps-members.html new file mode 100644 index 0000000..76ada4e --- /dev/null +++ b/html/structcmps-members.html @@ -0,0 +1,130 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
cmps Member List
+
+
+ +

This is the complete list of members for cmps, including all inherited members.

+ + + + + +
errorcmps
headingcmps
heading_hcmps
heading_lcmps
+
+ + + + diff --git a/html/structcmps.html b/html/structcmps.html new file mode 100644 index 0000000..a90789c --- /dev/null +++ b/html/structcmps.html @@ -0,0 +1,199 @@ + + + + + + +EVShield: cmps Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
cmps Struct Reference
+
+
+ +

#include <EVs_AbsoluteIMU.h>

+ + + + + + + + + + +

+Public Attributes

int heading
 
short heading_h
 
short heading_l
 
int error
 
+

Detailed Description

+

Compass related data

+

Member Data Documentation

+ +
+
+ + + + +
int cmps::error
+
+

Error generated in case of communication breakdown

+ +
+
+ +
+
+ + + + +
int cmps::heading
+
+

Compass value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short cmps::heading_h
+
+

Compass HSB value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short cmps::heading_l
+
+

Compass LSB value generated by AbsoluteIMU

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/html/structcmps.js b/html/structcmps.js new file mode 100644 index 0000000..a2f7fb6 --- /dev/null +++ b/html/structcmps.js @@ -0,0 +1,7 @@ +var structcmps = +[ + [ "error", "structcmps.html#a15459555768dd15735d70f987955e327", null ], + [ "heading", "structcmps.html#a3548115dbdac4a210038cbc2eb2a52fb", null ], + [ "heading_h", "structcmps.html#a8707ab07d6076df96723490ad552874a", null ], + [ "heading_l", "structcmps.html#a369760824a9279b2b781ac0fa25a8663", null ] +]; \ No newline at end of file diff --git a/html/structcolor-members.html b/html/structcolor-members.html new file mode 100644 index 0000000..5242f0b --- /dev/null +++ b/html/structcolor-members.html @@ -0,0 +1,129 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
color Member List
+
+
+ +

This is the complete list of members for color, including all inherited members.

+ + + + +
bcolor
gcolor
rcolor
+
+ + + + diff --git a/html/structcolor.html b/html/structcolor.html new file mode 100644 index 0000000..18f8d9c --- /dev/null +++ b/html/structcolor.html @@ -0,0 +1,184 @@ + + + + + + +EVShield: color Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
color Struct Reference
+
+
+ +

#include <EVs_PiLight.h>

+ + + + + + + + +

+Public Attributes

byte r
 
byte g
 
byte b
 
+

Detailed Description

+

Color related data

+

Member Data Documentation

+ +
+
+ + + + +
byte color::b
+
+

Color value of blue generated by the PiLight

+ +
+
+ +
+
+ + + + +
byte color::g
+
+

Color value of green generated by the PiLight

+ +
+
+ +
+
+ + + + +
byte color::r
+
+

Color value of red generated by the PiLight

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/html/structcolor.js b/html/structcolor.js new file mode 100644 index 0000000..af7f557 --- /dev/null +++ b/html/structcolor.js @@ -0,0 +1,6 @@ +var structcolor = +[ + [ "b", "structcolor.html#a54c0fe3a59d6f43a47d365c545de1693", null ], + [ "g", "structcolor.html#acf7ab1f06261eb6f6faa2be62e426261", null ], + [ "r", "structcolor.html#abdd01e7f85b6d9af6f95b50efa25675a", null ] +]; \ No newline at end of file diff --git a/html/structgyro-members.html b/html/structgyro-members.html new file mode 100644 index 0000000..7ec1a15 --- /dev/null +++ b/html/structgyro-members.html @@ -0,0 +1,136 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
gyro Member List
+
+
+ +

This is the complete list of members for gyro, including all inherited members.

+ + + + + + + + + + + +
errorgyro
gxgyro
gx_hgyro
gx_lgyro
gygyro
gy_hgyro
gy_lgyro
gzgyro
gz_hgyro
gz_lgyro
+
+ + + + diff --git a/html/structgyro.html b/html/structgyro.html new file mode 100644 index 0000000..c37fda6 --- /dev/null +++ b/html/structgyro.html @@ -0,0 +1,289 @@ + + + + + + +EVShield: gyro Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
gyro Struct Reference
+
+
+ +

#include <EVs_AbsoluteIMU.h>

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

short gx_h
 
short gx_l
 
short gy_h
 
short gy_l
 
short gz_h
 
short gz_l
 
int gx
 
int gy
 
int gz
 
int error
 
+

Detailed Description

+

Gyroscope related data

+

Member Data Documentation

+ +
+
+ + + + +
int gyro::error
+
+

Error generated in case of communication breakdown

+ +
+
+ +
+
+ + + + +
int gyro::gx
+
+

Gyroscope x-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gx_h
+
+

Gyroscope HSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gx_l
+
+

Gyroscope LSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int gyro::gy
+
+

Gyroscope y-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gy_h
+
+

Gyroscope HSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gy_l
+
+

Gyroscope LSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int gyro::gz
+
+

Gyroscope z-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gz_h
+
+

Gyroscope HSB z-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short gyro::gz_l
+
+

Gyroscope LSB z-axis value generated by AbsoluteIMU

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/html/structgyro.js b/html/structgyro.js new file mode 100644 index 0000000..d432ba6 --- /dev/null +++ b/html/structgyro.js @@ -0,0 +1,13 @@ +var structgyro = +[ + [ "error", "structgyro.html#aeba6f636500bcda412feb6c747d109e2", null ], + [ "gx", "structgyro.html#ad639908dd42034d143eaa58952178f91", null ], + [ "gx_h", "structgyro.html#a457b2ffb6b8e0a5cec0143994c1be939", null ], + [ "gx_l", "structgyro.html#a7fb053be95a9db20f4d105bb70452326", null ], + [ "gy", "structgyro.html#a37888c6f3a0d65241d2398a2abaa7ad9", null ], + [ "gy_h", "structgyro.html#a56190f3f73aaa2330408c1568a93abe4", null ], + [ "gy_l", "structgyro.html#a9e7810224096477bbd186212cad5d4f7", null ], + [ "gz", "structgyro.html#a7b3ae52daa1766ebd01360976299fc1c", null ], + [ "gz_h", "structgyro.html#ae9f52c7323da75f583f771e9fba8f087", null ], + [ "gz_l", "structgyro.html#a373e24f63c90274d1509d63cdc0d847c", null ] +]; \ No newline at end of file diff --git a/html/structmagnetic__field-members.html b/html/structmagnetic__field-members.html new file mode 100644 index 0000000..f9aa455 --- /dev/null +++ b/html/structmagnetic__field-members.html @@ -0,0 +1,136 @@ + + + + + + +EVShield: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ + + + + + diff --git a/html/structmagnetic__field.html b/html/structmagnetic__field.html new file mode 100644 index 0000000..e76a7c7 --- /dev/null +++ b/html/structmagnetic__field.html @@ -0,0 +1,289 @@ + + + + + + +EVShield: magnetic_field Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
EVShield +  v1.01 +
+
EVShield Library Reference by OpenElectrons.com
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
magnetic_field Struct Reference
+
+
+ +

#include <EVs_AbsoluteIMU.h>

+ + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

short mx_h
 
short mx_l
 
short my_h
 
short my_l
 
short mz_h
 
short mz_l
 
int mx
 
int my
 
int mz
 
int error
 
+

Detailed Description

+

Magnetic Field related data

+

Member Data Documentation

+ +
+
+ + + + +
int magnetic_field::error
+
+

Error generated in case of communication breakdown

+ +
+
+ +
+
+ + + + +
int magnetic_field::mx
+
+

Magnetic field x-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::mx_h
+
+

Magnetic field HSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::mx_l
+
+

Magnetic field LSB x-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int magnetic_field::my
+
+

Magnetic field y-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::my_h
+
+

Magnetic field HSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::my_l
+
+

Magnetic field LSB y-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
int magnetic_field::mz
+
+

Magnetic field z-axis value derived from HSB and LSB values generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::mz_h
+
+

Magnetic field HSB z-axis value generated by AbsoluteIMU

+ +
+
+ +
+
+ + + + +
short magnetic_field::mz_l
+
+

Magnetic field LSB z-axis value generated by AbsoluteIMU

+ +
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + diff --git a/html/structmagnetic__field.js b/html/structmagnetic__field.js new file mode 100644 index 0000000..e32c057 --- /dev/null +++ b/html/structmagnetic__field.js @@ -0,0 +1,13 @@ +var structmagnetic__field = +[ + [ "error", "structmagnetic__field.html#a7dce7d4bd0f86ffec29a48e5042599d3", null ], + [ "mx", "structmagnetic__field.html#abc0e0cdff5c13aec3adbc23486bf1158", null ], + [ "mx_h", "structmagnetic__field.html#ae8bfcd3b08429b6a95507bbca826e30b", null ], + [ "mx_l", "structmagnetic__field.html#a92ecd7973d13e1f2b1eb0d14c8270894", null ], + [ "my", "structmagnetic__field.html#a14c0c7b3f90afceea131bf8fd6b3da2d", null ], + [ "my_h", "structmagnetic__field.html#ad95e3ce79237e771761c3a99cdd2614e", null ], + [ "my_l", "structmagnetic__field.html#a68762acf927c8975d1393e69dd0e8245", null ], + [ "mz", "structmagnetic__field.html#ab5b9860a17bd2160d0edad3c29f50cc5", null ], + [ "mz_h", "structmagnetic__field.html#a0c1b9c2a008e45ba0b43baa1fad3ce4c", null ], + [ "mz_l", "structmagnetic__field.html#a3eac4c0eb2b7df43ebcc948dd340d89c", null ] +]; \ No newline at end of file diff --git a/html/sync_off.png b/html/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3b443fc62892114406e3d399421b2a881b897acc GIT binary patch literal 853 zcmV-b1FHOqP)oT|#XixUYy%lpuf3i8{fX!o zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py; zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK& z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sTxLGlJY5nc&Re zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j* literal 0 HcmV?d00001 diff --git a/html/sync_on.png b/html/sync_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e08320fb64e6fa33b573005ed6d8fe294e19db76 GIT binary patch literal 845 zcmV-T1G4;yP)Y;xxyHF2B5Wzm| zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I_))aP?*T)ow&n59{}X4$3Goat zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F={P0Y^?$4t z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU# z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+ z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$Mj4Uq05 X8=0q~qBNan00000NkvXXu0mjfptF>5 literal 0 HcmV?d00001 diff --git a/html/tab_a.png b/html/tab_a.png new file mode 100644 index 0000000000000000000000000000000000000000..3b725c41c5a527a3a3e40097077d0e206a681247 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD# z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4 literal 0 HcmV?d00001 diff --git a/html/tab_b.png b/html/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b4a8638cb3496a016eaed9e16ffc12846dea18 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^ literal 0 HcmV?d00001 diff --git a/html/tabs.css b/html/tabs.css new file mode 100644 index 0000000..9cf578f --- /dev/null +++ b/html/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 0000000..63ed44d --- /dev/null +++ b/keywords.txt @@ -0,0 +1,585 @@ + +####################################### +# Syntax Coloring Map For EVShield +####################################### + + +####################################### +# Datatypes (KEYWORD1) +####################################### + +COLORBLUE KEYWORD1 +COLORFULL KEYWORD1 +COLORGREEN KEYWORD1 +COLORRED KEYWORD1 +COLORNONE KEYWORD1 +EVs_AbsoluteIMU KEYWORD1 +EVs_AngleSensor KEYWORD1 +EVs_CurrentMeter KEYWORD1 +EVs_DISTNx KEYWORD1 +EVs_EV3Color KEYWORD1 +EVs_EV3Gyro KEYWORD1 +EVs_EV3Infrared KEYWORD1 +EVs_EV3SensorAdapter KEYWORD1 +EVs_EV3Sonar KEYWORD1 +EVs_EV3Ultrasonic KEYWORD1 +EVs_LineLeader KEYWORD1 +EVs_NXTCam KEYWORD1 +EVs_NXTColor KEYWORD1 +EVs_NXTLight KEYWORD1 +EVs_NXTMMX KEYWORD1 +EVs_NXTServo KEYWORD1 +EVs_NXTTouch KEYWORD1 +EVs_PFMate KEYWORD1 +EVs_PSPNx KEYWORD1 +EVs_RTC KEYWORD1 +EVs_SumoEyes KEYWORD1 +EVs_VoltMeter KEYWORD1 +EVShield KEYWORD1 +EVShieldAGS KEYWORD1 +EVShieldBank KEYWORD1 +EVShieldBankB KEYWORD1 +EVShieldI2C KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +BCDToInteger KEYWORD2 +BaseI2CDevice KEYWORD2 +EVs_DISTNx KEYWORD2 +EVs_EV3SensorAdapter KEYWORD2 +EVs_LineLeader KEYWORD2 +EVs_NXTCam KEYWORD2 +EVs_NXTMMX KEYWORD2 +EVs_NXTServo KEYWORD2 +EVs_PFMate KEYWORD2 +EVs_PSPNx KEYWORD2 +EVs_RTC KEYWORD2 +EVShield KEYWORD2 +EVShieldAGS KEYWORD2 +EVShieldBank KEYWORD2 +EVShieldBankB KEYWORD2 +EVShieldI2C KEYWORD2 +OBZoneToString KEYWORD2 +SoftI2cMaster KEYWORD2 +_buffer KEYWORD2 +adpaOff KEYWORD2 +adpaOn KEYWORD2 +aquireXpointCalibration KEYWORD2 +aquireXpointCalibrationEnd KEYWORD2 +aquireYpointCalibration KEYWORD2 +aquireYpointCalibrationEnd KEYWORD2 +aquireZpointCalibration KEYWORD2 +aquireZpointCalibrationEnd KEYWORD2 +asciiMode KEYWORD2 +BeaconInRange KEYWORD2 +calibrateBlack KEYWORD2 +calibrateWhite KEYWORD2 +camFirmware KEYWORD2 +checkAddress KEYWORD2 +configureEurope KEYWORD2 +configureUS KEYWORD2 +configureUniversal KEYWORD2 +controlMotor KEYWORD2 +deEnergize KEYWORD2 +detect KEYWORD2 +detectObstacleZone KEYWORD2 +directMode KEYWORD2 +disableTracking KEYWORD2 +editMacro KEYWORD2 +enableTracking KEYWORD2 +energize KEYWORD2 +getAddress KEYWORD2 +getAngle KEYWORD2 +getAverage KEYWORD2 +getBatteryVoltage KEYWORD2 +getBlackCalibration KEYWORD2 +getBlackLimit KEYWORD2 +getBlobs KEYWORD2 +getBumpCount KEYWORD2 +getButtons KEYWORD2 +getColorMap KEYWORD2 +getCommandRegA KEYWORD2 +getCommandRegB KEYWORD2 +getDayMonth KEYWORD2 +getDayWeek KEYWORD2 +getDeviceID KEYWORD2 +getDist KEYWORD2 +getEncoderPosition KEYWORD2 +getEncoderTarget KEYWORD2 +getFeatureSet KEYWORD2 +getFirmwareVersion KEYWORD2 +getHours KEYWORD2 +getKd KEYWORD2 +getKdFactor KEYWORD2 +getKi KEYWORD2 +getKiFactor KEYWORD2 +getKp KEYWORD2 +getKpFactor KEYWORD2 +getMinutes KEYWORD2 +getMode KEYWORD2 +getMonth KEYWORD2 +getMotorStatusByte KEYWORD2 +getMotorTasksRunningByte KEYWORD2 +getNumberObjects KEYWORD2 +getRawCalibrated KEYWORD2 +getRawUncalibrated KEYWORD2 +getRefAngle KEYWORD2 +getResult KEYWORD2 +getSeconds KEYWORD2 +getSens KEYWORD2 +getSetPoint KEYWORD2 +getSpeed KEYWORD2 +getSteering KEYWORD2 +getTimeToRun KEYWORD2 +getType KEYWORD2 +getVal KEYWORD2 +getVendorID KEYWORD2 +getVolt KEYWORD2 +getWhiteCalibration KEYWORD2 +getWhiteLimit KEYWORD2 +getWriteErrorCode KEYWORD2 +getXAccl KEYWORD2 +getXLJoy KEYWORD2 +getXRJoy KEYWORD2 +getXTilt KEYWORD2 +getYAccl KEYWORD2 +getYear KEYWORD2 +getYLJoy KEYWORD2 +getYRJoy KEYWORD2 +getYTilt KEYWORD2 +getZAccl KEYWORD2 +getZTilt KEYWORD2 +gotoEEPROM KEYWORD2 +haltMacro KEYWORD2 +illuminationOff KEYWORD2 +illuminationOn KEYWORD2 +init KEYWORD2 +initProtocol KEYWORD2 +invertLineColorToWhite KEYWORD2 +isNear KEYWORD2 +isPressed KEYWORD2 +issueCommand KEYWORD2 +isTachoDone KEYWORD2 +isTimeDone KEYWORD2 +ledSetRGB KEYWORD2 +motorGetCommandRegA KEYWORD2 +motorGetCommandRegB KEYWORD2 +motorGetEncoderPosition KEYWORD2 +motorGetEncoderTarget KEYWORD2 +motorGetSpeed KEYWORD2 +motorGetStatusByte KEYWORD2 +motorGetTasksRunningByte KEYWORD2 +motorGetTimeToRun KEYWORD2 +motorIsTachoDone KEYWORD2 +motorIsTimeDone KEYWORD2 +motorReset KEYWORD2 +motorResetEncoder KEYWORD2 +motorRunDegrees KEYWORD2 +motorRunRotations KEYWORD2 +motorRunSeconds KEYWORD2 +motorRunTachometer KEYWORD2 +motorRunUnlimited KEYWORD2 +motorSetCommandRegA KEYWORD2 +motorSetCommandRegB KEYWORD2 +motorSetEncoderPID KEYWORD2 +motorSetEncoderSpeedTimeAndControl KEYWORD2 +motorSetEncoderTarget KEYWORD2 +motorSetPassCount KEYWORD2 +motorSetSpeed KEYWORD2 +motorSetSpeedPID KEYWORD2 +motorSetSpeedTimeAndControl KEYWORD2 +motorSetTolerance KEYWORD2 +motorStartBothInSync KEYWORD2 +motorStop KEYWORD2 +motorWaitUntilTachoDone KEYWORD2 +motorWaitUntilTimeDone KEYWORD2 +evshieldGetBatteryVoltage KEYWORD2 +evshieldIssueCommand KEYWORD2 +pauseMacro KEYWORD2 +pingCam KEYWORD2 +read KEYWORD2 +readChannelHeading KEYWORD2 +readChannelProximity KEYWORD2 +readChannelButton KEYWORD2 +readColor KEYWORD2 +readButtonValue KEYWORD2 +readByte KEYWORD2 +readCapacityUsed KEYWORD2 +readElapsedTime KEYWORD2 +readImageRegisters KEYWORD2 +readInteger KEYWORD2 +readLong KEYWORD2 +readPresentCurrent KEYWORD2 +readPresentVoltage KEYWORD2 +readProximity KEYWORD2 +readRaw KEYWORD2 +readRegisters KEYWORD2 +readString KEYWORD2 +readValue KEYWORD2 +reset KEYWORD2 +resetBumpCount KEYWORD2 +resetCam KEYWORD2 +resetColorInversion KEYWORD2 +resetCounters KEYWORD2 +resetEncoder KEYWORD2 +resetFactory KEYWORD2 +restart KEYWORD2 +resumeMacro KEYWORD2 +runDegrees KEYWORD2 +runRotations KEYWORD2 +runSeconds KEYWORD2 +runServo KEYWORD2 +runTachometer KEYWORD2 +runUnlimited KEYWORD2 +selectLineMode KEYWORD2 +selectObjectMode KEYWORD2 +sendColorMap KEYWORD2 +sendKeyboardData KEYWORD2 +sendSignal KEYWORD2 +sendTextString KEYWORD2 +sensorReadRaw KEYWORD2 +sensorSetMode KEYWORD2 +setActive KEYWORD2 +setAddress KEYWORD2 +setAmbient KEYWROD2 +setAnalogMode KEYWORD2 +setApdaOff KEYWORD2 +setApdaOn KEYWORD2 +setChannel KEYWORD2 +setCommandRegA KEYWORD2 +setCommandRegB KEYWORD2 +setControl KEYWORD2 +setDigitalMode KEYWORD2 +setEncoderPID KEYWORD2 +setEncoderSpeedTimeAndControl KEYWORD2 +setEncoderTarget KEYWORD2 +setKd KEYWORD2 +setKdFactor KEYWORD2 +setKi KEYWORD2 +setKiFactor KEYWORD2 +setKp KEYWORD2 +setKpFactor KEYWORD2 +setLongRange KEYWORD2 +setMode KEYWORD2 +setModifier KEYWORD2 +setOperationA KEYWORD2 +setOperationB KEYWORD2 +setPassCount KEYWORD2 +setPassive KEYWORD2 +setPosition KEYWORD2 +setRef KEYWORD2 +setReflected KEYWORD2 +setSetPoint KEYWORD2 +setShortRange KEYWORD2 +setSpeed KEYWORD2 +setSpeedA KEYWORD2 +setSpeedB KEYWORD2 +setSpeedPID KEYWORD2 +setSpeedTimeAndControl KEYWORD2 +setTolerance KEYWORD2 +setType KEYWORD2 +setWriteErrorCode KEYWORD2 +sleep KEYWORD2 +sortColor KEYWORD2 +sortNone KEYWORD2 +sortSize KEYWORD2 +start KEYWORD2 +startMotorsInSync KEYWORD2 +stop KEYWORD2 +storeInitial KEYWORD2 +takeSnapshot KEYWORD2 +transmitData KEYWORD2 +waitUntilTachoDone KEYWORD2 +waitUntilTimeDone KEYWORD2 +wakeUp KEYWORD2 +write KEYWORD2 +writeByte KEYWORD2 +waitForButtonPress KEYWORD2 +writeImageRegisters KEYWORD2 +writeInteger KEYWORD2 +writeLong KEYWORD2 +writeRegisters KEYWORD2 +writeRegistersWithLocation KEYWORD2 +readGyro KEYWORD2 +readCompass KEYWORD2 +readAccelerometer KEYWORD2 +readMagneticField KEYWORD2 +beginCompassCalibration KEYWORD2 +endCompassCalibration KEYWORD2 +cmps KEYWORD2 +gyro KEYWORD2 +accl KEYWORD2 +magnetic_field KEYWORD2 +getACurrent KEYWORD2 +getRCurrent KEYWORD2 +getReference KEYWORD2 +setReferenceI KEYWORD2 +getAVoltage KEYWORD2 +getRVoltage KEYWORD2 +getReference KEYWORD2 +setReferenceV KEYWORD2 +getAngle KEYWORD2 +getRawReading KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### + +BASEI2CDEVICE_H LITERAL1 +BTN_GO LITERAL1 +BTN_LEFT LITERAL1 +BTN_RIGHT LITERAL1 +Button_Circle LITERAL1 +Button_Cross LITERAL1 +Button_Down LITERAL1 +Button_L1 LITERAL1 +Button_L2 LITERAL1 +Button_L3 LITERAL1 +Button_Left LITERAL1 +Button_R1 LITERAL1 +Button_R2 LITERAL1 +Button_R3 LITERAL1 +Button_Right LITERAL1 +Button_Select LITERAL1 +Button_Square LITERAL1 +Button_Start LITERAL1 +Button_Triangle LITERAL1 +Button_Up LITERAL1 +Cam_Command LITERAL1 +Cam_Number_Objects LITERAL1 +EVs_DISTNx_Command LITERAL1 +EVs_DISTNx_Distance LITERAL1 +EVs_DISTNx_H LITERAL1 +EVs_DISTNx_SensorType LITERAL1 +EVs_DISTNx_Voltage LITERAL1 +EVs_EV3Color_H LITERAL1 +EVs_EV3Gyro_H LITERAL1 +EVs_EV3Infrared_H LITERAL1 +EVs_EV3Touch_H LITERAL1 +EVs_EV3Ultrasonic_H LITERAL1 +EVs_LineLeader_Average LITERAL1 +EVs_LineLeader_Black_Calibration LITERAL1 +EVs_LineLeader_Black_Limit LITERAL1 +EVs_LineLeader_Command LITERAL1 +EVs_LineLeader_H LITERAL1 +EVs_LineLeader_Kp LITERAL1 +EVs_LineLeader_Kp_Factor LITERAL1 +EVs_LineLeader_Ki LITERAL1 +EVs_LineLeader_Ki_Factor LITERAL1 +EVs_LineLeader_Kd LITERAL1 +EVs_LineLeader_Kd_Factor LITERAL1 +EVs_LineLeader_Raw_Calibrated LITERAL1 +EVs_LineLeader_Raw_Uncalibrated LITERAL1 +EVs_LineLeader_Result LITERAL1 +EVs_LineLeader_SetPoint LITERAL1 +EVs_LineLeader_Steering LITERAL1 +EVs_LineLeader_White_Calibration LITERAL1 +EVs_LineLeader_White_Limit LITERAL1 +EVs_MMX_CMD_A_M1 LITERAL1 +EVs_MMX_CMD_A_M2 LITERAL1 +EVs_MMX_CMD_B_M1 LITERAL1 +EVs_MMX_CMD_B_M2 LITERAL1 +EVs_MMX_COMMAND LITERAL1 +EVs_MMX_Completion_Dont_Wait LITERAL1 +EVs_MMX_Completion_Wait_For LITERAL1 +EVs_MMX_CONTROL_BRK LITERAL1 +EVs_MMX_CONTROL_GO LITERAL1 +EVs_MMX_CONTROL_ON LITERAL1 +EVs_MMX_CONTROL_RAMP LITERAL1 +EVs_MMX_CONTROL_RELATIVE LITERAL1 +EVs_MMX_CONTROL_SPEED LITERAL1 +EVs_MMX_CONTROL_TACHO LITERAL1 +EVs_MMX_CONTROL_TIME LITERAL1 +EVs_MMX_Direction_Forward LITERAL1 +EVs_MMX_Direction_Reverse LITERAL1 +EVs_MMX_ENCODER_PID LITERAL1 +EVs_MMX_Motor_1 LITERAL1 +EVs_MMX_Motor_2 LITERAL1 +EVs_MMX_Motor_Both LITERAL1 +EVs_MMX_Move_Absolute LITERAL1 +EVs_MMX_Move_Relative LITERAL1 +EVs_MMX_Next_Action_Brake LITERAL1 +EVs_MMX_Next_Action_BrakeHold LITERAL1 +EVs_MMX_Next_Action_Float LITERAL1 +EVs_MMX_PASS_COUNT LITERAL1 +EVs_MMX_POSITION_M1 LITERAL1 +EVs_MMX_POSITION_M2 LITERAL1 +EVs_MMX_Speed_Full LITERAL1 +EVs_MMX_SETPT_M1 LITERAL1 +EVs_MMX_SETPT_M2 LITERAL1 +EVs_MMX_SPEED_M1 LITERAL1 +EVs_MMX_SPEED_M2 LITERAL1 +EVs_MMX_Speed_Medium LITERAL1 +EVs_MMX_SPEED_PID LITERAL1 +EVs_MMX_Speed_Slow LITERAL1 +EVs_MMX_STATUS_M1 LITERAL1 +EVs_MMX_STATUS_M2 LITERAL1 +EVs_MMX_TASKS_M1 LITERAL1 +EVs_MMX_TASKS_M2 LITERAL1 +EVs_MMX_TIME_M1 LITERAL1 +EVs_MMX_TIME_M2 LITERAL1 +EVs_MMX_TOLERANCE LITERAL1 +EVs_MMX_VOLTAGE LITERAL1 +EVs_NXTCam_H LITERAL1 +EVs_NXTLight_H LITERAL1 +EVs_NXTColor_H LITERAL1 +EVs_NXTMMX_H LITERAL1 +EVs_NXTServo_H LITERAL1 +EVs_NXTTouch_H LITERAL1 +EVs_PF_Channel LITERAL1 +EVs_PF_Channel_1 LITERAL1 +EVs_PF_Channel_2 LITERAL1 +EVs_PF_Channel_3 LITERAL1 +EVs_PF_Channel_4 LITERAL1 +EVs_PF_Commmand LITERAL1 +EVs_PF_Control LITERAL1 +EVs_PF_Contol_A LITERAL1 +EVs_PF_Contol_B LITERAL1 +EVs_PF_Contol_Both LITERAL1 +EVs_PFMate_H LITERAL1 +EVs_PF_Operation_A LITERAL1 +EVs_PF_Operation_B LITERAL1 +EVs_PF_Operation_Brake LITERAL1 +EVs_PF_Operation_Float LITERAL1 +EVs_PF_Operation_Forward LITERAL1 +EVs_PF_Operation_Reverse LITERAL1 +EVs_PF_Speed_A LITERAL1 +EVs_PF_Speed_B LITERAL1 +EVs_PF_Speed_Full LITERAL1 +EVs_PF_Speed_Medium LITERAL1 +EVs_PF_Speed_Slow LITERAL1 +EVs_PSPNx_ButtonSet1 LITERAL1 +EVs_PSPNx_ButtonSet2 LITERAL1 +EVs_PSPNx_Command LITERAL1 +EVs_PSPNx_H LITERAL1 +EVs_PSPNx_XLeftJoystick LITERAL1 +EVs_PSPNx_XRightJoystick LITERAL1 +EVs_PSPNx_YLeftJoystick LITERAL1 +EVs_PSPNx_YRightJoystick LITERAL1 +EVs_RTC_Day_of_Month LITERAL1 +EVs_RTC_Day_of_Week LITERAL1 +EVs_RTC_H LITERAL1 +EVs_RTC_Hours LITERAL1 +EVs_RTC_Minutes LITERAL1 +EVs_RTC_Month LITERAL1 +EVs_RTC_Seconds LITERAL1 +EVs_RTC_Year LITERAL1 +EVs_SUMOEYES_H LITERAL1 +EVShield_H LITERAL1 +EVShieldAGS_H LITERAL1 +EVShieldI2C_H LITERAL1 +I2C_DELAY_USEC LITERAL1 +I2C_READ LITERAL1 +I2C_WRITE LITERAL1 +MODE_Color_AmbientLight LITERAL1 +MODE_Color_MeasureColor LITERAL1 +MODE_Color_ReflectedLight LITERAL1 +MODE_Gyro_Angle LITERAL1 +MODE_Gyro_Rate LITERAL1 +MODE_Infrared_Beacon LITERAL1 +MODE_Infrared_Proximity LITERAL1 +MODE_Infrared_Remote LITERAL1 +MODE_Sonar_CM LITERAL1 +MODE_Sonar_Inches LITERAL1 +MODE_Sonar_Presence LITERAL1 +READ_SENS LITERAL1 +Servo_1 LITERAL1 +Servo_2 LITERAL1 +Servo_3 LITERAL1 +Servo_4 LITERAL1 +Servo_5 LITERAL1 +Servo_6 LITERAL1 +Servo_7 LITERAL1 +Servo_8 LITERAL1 +Servo_Command LITERAL1 +Servo_Position_1 LITERAL1 +Servo_Position_2 LITERAL1 +Servo_Position_3 LITERAL1 +Servo_Position_4 LITERAL1 +Servo_Position_5 LITERAL1 +Servo_Position_6 LITERAL1 +Servo_Position_7 LITERAL1 +Servo_Position_8 LITERAL1 +Servo_Position_Default LITERAL1 +Servo_Speed_1 LITERAL1 +Servo_Speed_2 LITERAL1 +Servo_Speed_3 LITERAL1 +Servo_Speed_4 LITERAL1 +Servo_Speed_5 LITERAL1 +Servo_Speed_6 LITERAL1 +Servo_Speed_7 LITERAL1 +Servo_Speed_8 LITERAL1 +Servo_Speed_Full LITERAL1 +Servo_Voltage LITERAL1 +SH_Bank_A LITERAL1 +SH_Bank_B LITERAL1 +SH_BankPort LITERAL1 +SH_BAS1 LITERAL1 +SH_BAS2 LITERAL1 +SH_BBS1 LITERAL1 +SH_BBS2 LITERAL1 +SH_CMD_A_M2 LITERAL1 +SH_CMD_A_M1 LITERAL1 +SH_CMD_B_M1 LITERAL1 +SH_CMD_B_M2 LITERAL1 +SH_COMMAND LITERAL1 +SH_Completion_Dont_Wait LITERAL1 +SH_Completion_Wait LITERAL1 +SH_Completion_Wait_For LITERAL1 +SH_CONTROL_BRK LITERAL1 +SH_CONTROL_GO LITERAL1 +SH_CONTROL_ON LITERAL1 +SH_CONTROL_SPEED LITERAL1 +SH_CONTROL_RAMP LITERAL1 +SH_CONTROL_RELATIVE LITERAL1 +SH_CONTROL_TACHO LITERAL1 +SH_CONTROL_TIME LITERAL1 +SH_Direction LITERAL1 +SH_Direction_Forward LITERAL1 +SH_Direction_Reverse LITERAL1 +SH_ENCODER_PID LITERAL1 +SH_HardwareI2C LITERAL1 +SH_Mode_ANALOG LITERAL1 +SH_Mode_ANALOG_9VOLTS LITERAL1 +SH_Mode_ANALOG_PASSIVE LITERAL1 +SH_Mode_DATABIT_HIGH LITERAL1 +SH_Mode_I2C LITERAL1 +SH_Mode_MIXED LITERAL1 +SH_Motor LITERAL1 +SH_Motor_1 LITERAL1 +SH_Motor_2 LITERAL1 +SH_Motor_Both LITERAL1 +SH_Move_Absolute LITERAL1 +SH_Move_Relative LITERAL1 +SH_Next_Action LITERAL1 +SH_Next_Action_Brake LITERAL1 +SH_Next_Action_BrakeHold LITERAL1 +SH_Next_Action_Float LITERAL1 +SH_PASS_COUNT LITERAL1 +SH_POSITION_M1 LITERAL1 +SH_POSITION_M2 LITERAL1 +SH_Protocols LITERAL1 +SH_S1 LITERAL1 +SH_S2 LITERAL1 +SH_SETPT_M1 LITERAL1 +SH_SETPT_M2 LITERAL1 +SH_SoftwareI2C LITERAL1 +SH_Speed_Full LITERAL1 +SH_SPEED_M1 LITERAL1 +SH_SPEED_M2 LITERAL1 +SH_Speed_Medium LITERAL1 +SH_SPEED_PID LITERAL1 +SH_Speed_Slow LITERAL1 +SH_STATUS_M1 LITERAL1 +SH_STATUS_M2 LITERAL1 +SH_TASKS_M1 LITERAL1 +SH_TASKS_M2 LITERAL1 +SH_TIME_M1 LITERAL1 +SH_TIME_M2 LITERAL1 +SH_TOLERANCE LITERAL1 +SH_VOLTAGE LITERAL1 +SHDEFINES_H LITERAL1 +SOFT_I2C_MASTER LITERAL1 +Start_Reg LITERAL1