This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ros.h> | |
#include <std_msgs/Bool.h> | |
#include <std_msgs/Float32MultiArray.h> | |
#include <std_msgs/Int8.h> | |
#include <std_msgs/UInt8.h> | |
#include <Servo.h> | |
const int REIGHT_INFRARED_ANALOG_PIN = 0; | |
const int LEFT_INFRARED_ANALOG_PIN = 1; | |
const int CENTER_INFRARED_ANALOG_PIN = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// LocationSample | |
// | |
import CoreLocation | |
import UIKit | |
class ViewController: UIViewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.locationsample | |
import android.Manifest | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.net.Uri | |
import android.os.Bundle | |
import android.provider.Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// PushSample | |
// | |
import UIKit | |
import UserNotifications | |
@main | |
class AppDelegate: UIResponder, UIApplicationDelegate { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import machine | |
import utime | |
# Servoモータの電源は単3電池x3から | |
# PIR センサーはPicoの5Vピンから | |
# 同じ電源から取ってServoを動かすとOFFからすぐにONになるような挙動になる | |
servo = machine.PWM(machine.Pin(2)) | |
servo.freq(50) | |
# サーボが動作可能な範囲 |