File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## [ 1.5.4] - 2016-05-02
2+
3+ ### Fix
4+
5+ - if SERIAL_NUMBER_ADDRESS equal SERIAL_NUMBER_ADDRESS, then Serial Number exist in EEPROM
6+
17## [ 1.5.3] - 2016-05-02
28
39### Changes
410
5- - Add readSerialNumber & writeSerialNumber function
11+ - Add readSerialNumber & writeSerialNumber function (Serial Number: Address 1024, size:14)
612
713
814## [ 1.5.2] - 2016-04-29
Original file line number Diff line number Diff line change 33 * Author : Joey Song
44 * Updated : Joey Song, Alex Tan, Dave Corboy
55 * Email : joey@ufactory.cc
6- * Version : V1.5.2
7- * Date : 12 Dec, 2014
8- * Modified Date : 18 Apr, 2016
96 * Description :
107 * License :
118 * Copyright(C) 2016 UFactory Team. All right reserved.
@@ -24,18 +21,21 @@ uArmClass::uArmClass()
2421* SERIAL NUMBER ADDRESS : 1024, Size: 14
2522*/
2623void uArmClass::readSerialNumber (byte (&byte_sn_array)[14]){
27- for (byte i=0 ; i<14 ; i++){
28- byte_sn_array[i] = EEPROM .read (SERIAL_NUMBER_ADDRESS +i);
29- }
24+ if (EEPROM .read (SERIAL_NUMBER_ADDRESS ) == SERIAL_NUMBER_ADDRESS ){
25+ for (byte i=0 ; i<14 ; i++){
26+ byte_sn_array[i] = EEPROM .read (SERIAL_NUMBER_ADDRESS +i+1 );
27+ }
28+ }
3029}
3130
3231/* Write Serial Number to EEPROM
3332* SERIAL NUMBER ADDRESS : 1024, Size: 14
3433*/
3534void uArmClass::writeSerialNumber (byte (&byte_sn_array)[14]){
36- for (byte i=0 ; i<14 ; i++){
37- EEPROM .write (SERIAL_NUMBER_ADDRESS +i, byte_sn_array[i]);
38- }
35+ for (byte i=0 ; i<14 ; i++){
36+ EEPROM .write (SERIAL_NUMBER_ADDRESS +i+1 , byte_sn_array[i]);
37+ }
38+ EEPROM .write (SERIAL_NUMBER_ADDRESS , SERIAL_NUMBER_ADDRESS );
3939}
4040
4141/* Use BUZZER for Alert
Original file line number Diff line number Diff line change 2222
2323#define UARM_MAJOR_VERSION 1
2424#define UARM_MINOR_VERSION 5
25- #define UARM_BUGFIX 3
25+ #define UARM_BUGFIX 4
2626
2727#define SERVO_ROT_NUM 0
2828#define SERVO_LEFT_NUM 1
You can’t perform that action at this time.
0 commit comments