这可能是一个基本的问题,但我遵循本教程,在某一点上,代码看起来是这样的。
<?php
class person
{
public $name;
public $height;
protected $social_security_no;
private $pin_number = 3242;
public function __construct($person_name)
{
$this->name = $person_name;
}
public function set_name($new_n
这是我第一次编写mikrokontroler程序,我使用uVison并使用stm32进行编程。
我的引脚上有两个LED灯: PIN_4和PIN_5,还有一个教程,我知道如何眨眼(下面的代码),但我不知道如何让它们闪烁而不是同样的延迟。就像我想让PIN_4延迟100 of,PIN:5引导,延迟50 of。下面的代码是一个Led灯的代码。
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN
我想不出怎么做一个拖拉的图钉。我使用了类似于教程的代码,我可以在任何地方找到:
<script type='text/javascript'>
function GetMap()
{
var loc = new Microsoft.Maps.Location(47.1, 2.20696);
var map = new Microsoft.Maps.Map('#myMap', {
credentials: 'XXXXXXXXXXXXX'
,
首先,对于Arduino来说,我是非常新的,我已经研读了一些教程,以努力完成这项工作,但似乎没有什么对我有帮助。我想做的是让一个LCD背光激活8秒时,按钮被按下。
我第一次尝试代码时取得了一些小小的成功:
const int buttonPin = 13; // the number of the pushbutton pin
const int ledPin = 9; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for re
我在raspberry pi zero上的i2c库有问题。 我用python编写了我的代码,使用了很多教程,但没有一个是完全足够的。这段代码中缺少time.sleep(),但即使包含在内,问题仍然存在。它可以与设备通信,但不能正常通信。它在设备BME280上进行了测试。 import RPi.GPIO as GPIO
import time
class SMBus(object):
pin_SCL = 0
pin_SDA = 0
signal = []
def __init__(self, bus=-1):
GPIO.setmode(GP
更新:我的Github仓库
我刚刚完成了onemonthrails教程。最后一章是关于无休止的滚动。我三次检查了我的代码,但它不起作用。我没搞错什么。它什么也做不了。我正在构建一个pinterest克隆,在我滚动到底部之后,它应该会加载下一页的引脚。
这是我的pins.js.coffee
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can
我刚接触USART通信,所以如果我问了一个愚蠢的问题,请原谅。 我正在使用STM32F0discovry板和使用IAR EWARM的代码。我的main函数看起来像这样。在main函数之后还有一个HAL_UART_RxCpltCallback函数。 int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all periph