资源简介
matlab开发-HX711的自定义数据库。从HX711称重传感器放大器获取数据并导入Matlab工作区。
代码片段和文件信息
% Copyright 2018 Nicholas Giacoboni
%
% Redistribution and use in source and binary forms with or without
% modification are permitted provided that the following conditions are met:
%
% 1. Redistributions of source code must retain the above copyright
% notice this list of conditions and the following disclaimer.
%
% 2. Redistributions in binary form must reproduce the above copyright
% notice this list of conditions and the following disclaimer in the
% documentation and/or other materials provided with the distribution.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
% AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED
% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
% IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT
% INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT
% NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR
% PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY
% WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY
% OF SUCH DAMAGE.
%**************************************************************************
%% CALIBRATE YOUR LOADCELL WITH ARDUINO
classdef calibration
properties
n % Number of readings
known_weight % Weight used for calibration
tare_weight = 0
scale_factor = 1
end
methods(Access = public)
%% CONSTRUCTOR
function cal = calibration(varargin)
if nargin < 2
error(‘Not enough input arguments.‘);
elseif nargin > 2
error(‘Not enough input arguments.‘);
end
% The number of readings must be positive
if varargin{1} < 0
error(‘The number of readings must be positive‘);
end
cal.n = varargin{1};
cal.known_weight = varargin{2};
end
%% Tare
function tare_value = tare(varargin)
if nargin < 2
error(‘MyComponent:incorrectType‘...
‘Not enough input arguments:\nprovide *calibration* and *HX711* %s‘...
‘class objects in this order.‘);
elseif nargin > 2
error(‘MyComponent:incorrectType‘...
‘Too many input arguments:\nprovide *calibration* and *HX711* %s‘...
‘class objects in this order.‘);
end
obj = varargin{1};
HX711_obj = varargin{2};
value = 1:1:obj.n;
for i=1:1:obj.n
value(i) = read_HX711(HX711_obj);
end
tare_value = me
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2667 2018-04-04 04:48 HX711 v2.0\+arduinoioaddons\+ExampleAddon\HX711.m
文件 2382 2018-03-27 04:55 HX711 v2.0\+arduinoioaddons\+ExampleAddon\src\HX711.h
文件 7599 2018-04-15 23:14 HX711 v2.0\calibration.m
文件 111589 2018-01-02 06:53 HX711 v2.0\HX711.jpg
文件 151060 2018-04-15 18:59 HX711 v2.0\HX711.mlapp
文件 1787450 2018-04-18 05:20 HX711 v2.0\User‘s Manual.pdf
文件 1318 2018-04-17 18:01 license.txt
相关资源
- matlab开发-SMOTEBoost
- matlab开发-果蝇优化算法第二版
- matlab开发-多变量决策树
- matlab开发-水轮发电机模型
- matlab开发-交通警告标志识别标签代码
- matlab开发-RUSBoost
- matlab开发-基于遗传算法的机器人运动
- matlab开发-MPU6050加速度陀螺仪
- matlab开发-功率曲线FAsmallscalewindturbi
- matlab开发-NASAJPLDE405开发星历表
- matlab开发-SortinoRatio
- matlab开发-永磁TDC并联电机数学模型
- matlab开发-3相SPWM整流器
- matlab开发-Kilobotswarm控制Matlabarduino
- matlab开发-简单音频播放
- matlab开发-记录文件的绘图仪加速度、
- matlab开发-永磁同步电机PMSM动态数学模
- matlab开发-多目标优化差分进化算法
- matlab开发-随机微分方程解算
- matlab开发-波长调制光谱的二次谐波模
- matlab开发-仿制药生物生理学基础药动
- matlab开发-使用svmrfe选择功能
- matlab开发-KDTreeNearestNeighborandRangeSear
- matlab开发-stlread
- matlab开发-三维图像堆栈查看器
- matlab开发-动态电压恢复器故障dvr
- matlab开发-数据处理的分组方法GMDH
- matlab开发-DVR
- matlab开发-ParetoSet
- matlab开发-ShamirsSecretSharing
评论
共有 条评论